@redocly/openapi-docs 3.16.0-next.0 → 3.16.0-next.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* @license Redocly OpenAPI Docs
|
|
3
3
|
* (c) Copyright 2025 Redocly LLC, all rights reserved.
|
|
4
4
|
* -------------------------------------------------------------
|
|
5
|
-
* Version: 3.16.0-next.
|
|
5
|
+
* Version: 3.16.0-next.1
|
|
6
6
|
**/function DF(e,a){for(var t=0;t<a.length;t++){const r=a[t];if(typeof r!="string"&&!Array.isArray(r)){for(const n in r)if(n!=="default"&&!(n in e)){const i=Object.getOwnPropertyDescriptor(r,n);i&&Object.defineProperty(e,n,i.get?i:{enumerable:!0,get:()=>r[n]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}function Vr(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function $F(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var a=e.default;if(typeof a=="function"){var t=function r(){var n=!1;try{n=this instanceof r}catch{}return n?Reflect.construct(a,arguments,this.constructor):a.apply(this,arguments)};t.prototype=a.prototype}else t={};return Object.defineProperty(t,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:function(){return e[r]}})}),t}var IF={exports:{}},nk={};/**
|
|
7
7
|
* @license React
|
|
8
8
|
* react-jsx-runtime.production.js
|
|
@@ -6018,7 +6018,7 @@ Error generating stack: `+j.message+`
|
|
|
6018
6018
|
align-items: center;
|
|
6019
6019
|
`;var D6,KJ;function N_e(){if(KJ)return D6;KJ=1;var e=Object.prototype.hasOwnProperty,a=Object.prototype.toString;return D6=function(t,r,n){if(a.call(r)!=="[object Function]")throw new TypeError("iterator must be a function");var i=t.length;if(i===+i)for(var o=0;o<i;o++)r.call(n,t[o],o,t);else for(var s in t)e.call(t,s)&&r.call(n,t[s],s,t)},D6}var $6,VJ;function D_e(){if(VJ)return $6;VJ=1;var e=N_e();$6=a;function a(t,r,n){if(arguments.length===3)return a.set(t,r,n);if(arguments.length===2)return a.get(t,r);var i=a.bind(a,t);for(var o in a)a.hasOwnProperty(o)&&(i[o]=a[o].bind(i,t));return i}return a.get=function(t,r){for(var n=Array.isArray(r)?r:a.parse(r),i=0;i<n.length;++i){var o=n[i];if(!(typeof t=="object"&&o in t))throw new Error("Invalid reference token: "+o);t=t[o]}return t},a.set=function(t,r,n){var i=Array.isArray(r)?r:a.parse(r),o=i[0];if(i.length===0)throw Error("Can not set the root object");for(var s=0;s<i.length-1;++s){var l=i[s];typeof l!="string"&&typeof l!="number"&&(l=String(l)),!(l==="__proto__"||l==="constructor"||l==="prototype")&&(l==="-"&&Array.isArray(t)&&(l=t.length),o=i[s+1],l in t||(o.match(/^(\d+|-)$/)?t[l]=[]:t[l]={}),t=t[l])}return o==="-"&&Array.isArray(t)&&(o=t.length),t[o]=n,this},a.remove=function(t,r){var n=Array.isArray(r)?r:a.parse(r),i=n[n.length-1];if(i===void 0)throw new Error('Invalid JSON pointer for remove: "'+r+'"');var o=a.get(t,n.slice(0,-1));if(Array.isArray(o)){var s=+i;if(i===""&&isNaN(s))throw new Error('Invalid array index: "'+i+'"');Array.prototype.splice.call(o,s,1)}else delete o[i]},a.dict=function(t,r){var n={};return a.walk(t,function(i,o){n[o]=i},r),n},a.walk=function(t,r,n){var i=[];n=n||function(o){var s=Object.prototype.toString.call(o);return s==="[object Object]"||s==="[object Array]"},(function o(s){e(s,function(l,c){i.push(String(c)),n(l)?o(l):r(l,a.compile(i)),i.pop()})})(t)},a.has=function(t,r){try{a.get(t,r)}catch{return!1}return!0},a.escape=function(t){return t.toString().replace(/~/g,"~0").replace(/\//g,"~1")},a.unescape=function(t){return t.replace(/~1/g,"/").replace(/~0/g,"~")},a.parse=function(t){if(t==="")return[];if(t.charAt(0)!=="/")throw new Error("Invalid JSON pointer: "+t);return t.substring(1).split(/\//).map(a.unescape)},a.compile=function(t){return t.length===0?"":"/"+t.map(a.escape).join("/")},$6}var $_e=D_e();const Di=Vr($_e),I_e=Di.parse;class yr{static baseName(a="",t=1){const r=yr.parse(a);return r[r.length-t]}static dirName(a,t=1){const r=yr.parse(a);return Di.compile(r.slice(0,r.length-t))}static relative(a,t){const r=yr.parse(a);return yr.parse(t).slice(r.length)}static parse(a=""){let t=a;return t.charAt(0)==="#"&&(t=t.substring(1)),I_e(t)}static join(a,t){const r=yr.parse(a).concat(t);return Di.compile(r)}static get(a,t){return Di.get(a,t)}static compile(a){return Di.compile(a)}static escape(a){return Di.escape(a)}}Di.parse=yr.parse,Object.assign(yr,Di);var I6,HJ;function FJ(){if(HJ)return I6;HJ=1;function e(n){if(typeof n!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(n))}function a(n,i){for(var o="",s=0,l=-1,c=0,u,d=0;d<=n.length;++d){if(d<n.length)u=n.charCodeAt(d);else{if(u===47)break;u=47}if(u===47){if(!(l===d-1||c===1))if(l!==d-1&&c===2){if(o.length<2||s!==2||o.charCodeAt(o.length-1)!==46||o.charCodeAt(o.length-2)!==46){if(o.length>2){var p=o.lastIndexOf("/");if(p!==o.length-1){p===-1?(o="",s=0):(o=o.slice(0,p),s=o.length-1-o.lastIndexOf("/")),l=d,c=0;continue}}else if(o.length===2||o.length===1){o="",s=0,l=d,c=0;continue}}i&&(o.length>0?o+="/..":o="..",s=2)}else o.length>0?o+="/"+n.slice(l+1,d):o=n.slice(l+1,d),s=d-l-1;l=d,c=0}else u===46&&c!==-1?++c:c=-1}return o}function t(n,i){var o=i.dir||i.root,s=i.base||(i.name||"")+(i.ext||"");return o?o===i.root?o+s:o+n+s:s}var r={resolve:function(){for(var n="",i=!1,o,s=arguments.length-1;s>=-1&&!i;s--){var l;s>=0?l=arguments[s]:(o===void 0&&(o=process.cwd()),l=o),e(l),l.length!==0&&(n=l+"/"+n,i=l.charCodeAt(0)===47)}return n=a(n,!i),i?n.length>0?"/"+n:"/":n.length>0?n:"."},normalize:function(n){if(e(n),n.length===0)return".";var i=n.charCodeAt(0)===47,o=n.charCodeAt(n.length-1)===47;return n=a(n,!i),n.length===0&&!i&&(n="."),n.length>0&&o&&(n+="/"),i?"/"+n:n},isAbsolute:function(n){return e(n),n.length>0&&n.charCodeAt(0)===47},join:function(){if(arguments.length===0)return".";for(var n,i=0;i<arguments.length;++i){var o=arguments[i];e(o),o.length>0&&(n===void 0?n=o:n+="/"+o)}return n===void 0?".":r.normalize(n)},relative:function(n,i){if(e(n),e(i),n===i||(n=r.resolve(n),i=r.resolve(i),n===i))return"";for(var o=1;o<n.length&&n.charCodeAt(o)===47;++o);for(var s=n.length,l=s-o,c=1;c<i.length&&i.charCodeAt(c)===47;++c);for(var u=i.length,d=u-c,p=l<d?l:d,m=-1,g=0;g<=p;++g){if(g===p){if(d>p){if(i.charCodeAt(c+g)===47)return i.slice(c+g+1);if(g===0)return i.slice(c+g)}else l>p&&(n.charCodeAt(o+g)===47?m=g:g===0&&(m=0));break}var b=n.charCodeAt(o+g),y=i.charCodeAt(c+g);if(b!==y)break;b===47&&(m=g)}var v="";for(g=o+m+1;g<=s;++g)(g===s||n.charCodeAt(g)===47)&&(v.length===0?v+="..":v+="/..");return v.length>0?v+i.slice(c+m):(c+=m,i.charCodeAt(c)===47&&++c,i.slice(c))},_makeLong:function(n){return n},dirname:function(n){if(e(n),n.length===0)return".";for(var i=n.charCodeAt(0),o=i===47,s=-1,l=!0,c=n.length-1;c>=1;--c)if(i=n.charCodeAt(c),i===47){if(!l){s=c;break}}else l=!1;return s===-1?o?"/":".":o&&s===1?"//":n.slice(0,s)},basename:function(n,i){if(i!==void 0&&typeof i!="string")throw new TypeError('"ext" argument must be a string');e(n);var o=0,s=-1,l=!0,c;if(i!==void 0&&i.length>0&&i.length<=n.length){if(i.length===n.length&&i===n)return"";var u=i.length-1,d=-1;for(c=n.length-1;c>=0;--c){var p=n.charCodeAt(c);if(p===47){if(!l){o=c+1;break}}else d===-1&&(l=!1,d=c+1),u>=0&&(p===i.charCodeAt(u)?--u===-1&&(s=c):(u=-1,s=d))}return o===s?s=d:s===-1&&(s=n.length),n.slice(o,s)}else{for(c=n.length-1;c>=0;--c)if(n.charCodeAt(c)===47){if(!l){o=c+1;break}}else s===-1&&(l=!1,s=c+1);return s===-1?"":n.slice(o,s)}},extname:function(n){e(n);for(var i=-1,o=0,s=-1,l=!0,c=0,u=n.length-1;u>=0;--u){var d=n.charCodeAt(u);if(d===47){if(!l){o=u+1;break}continue}s===-1&&(l=!1,s=u+1),d===46?i===-1?i=u:c!==1&&(c=1):i!==-1&&(c=-1)}return i===-1||s===-1||c===0||c===1&&i===s-1&&i===o+1?"":n.slice(i,s)},format:function(n){if(n===null||typeof n!="object")throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof n);return t("/",n)},parse:function(n){e(n);var i={root:"",dir:"",base:"",ext:"",name:""};if(n.length===0)return i;var o=n.charCodeAt(0),s=o===47,l;s?(i.root="/",l=1):l=0;for(var c=-1,u=0,d=-1,p=!0,m=n.length-1,g=0;m>=l;--m){if(o=n.charCodeAt(m),o===47){if(!p){u=m+1;break}continue}d===-1&&(p=!1,d=m+1),o===46?c===-1?c=m:g!==1&&(g=1):c!==-1&&(g=-1)}return c===-1||d===-1||g===0||g===1&&c===d-1&&c===u+1?d!==-1&&(u===0&&s?i.base=i.name=n.slice(1,d):i.base=i.name=n.slice(u,d)):(u===0&&s?(i.name=n.slice(1,c),i.base=n.slice(1,d)):(i.name=n.slice(u,c),i.base=n.slice(u,d)),i.ext=n.slice(c,d)),u>0?i.dir=n.slice(0,u-1):s&&(i.dir="/"),i},sep:"/",delimiter:":",win32:null,posix:null};return r.posix=r,I6=r,I6}var rt=FJ();const um=Vr(rt),K_e=DF({__proto__:null,default:um},[rt]);var K6={exports:{}},V_e=K6.exports,GJ;function H_e(){return GJ||(GJ=1,(function(e,a){(function(t,r){e.exports=r()})(V_e,function(){function t(){}return t.prototype.encodeReserved=function(r){return r.split(/(%[0-9A-Fa-f]{2})/g).map(function(n){return/%[0-9A-Fa-f]/.test(n)||(n=encodeURI(n).replace(/%5B/g,"[").replace(/%5D/g,"]")),n}).join("")},t.prototype.encodeUnreserved=function(r){return encodeURIComponent(r).replace(/[!'()*]/g,function(n){return"%"+n.charCodeAt(0).toString(16).toUpperCase()})},t.prototype.encodeValue=function(r,n,i){return n=r==="+"||r==="#"?this.encodeReserved(n):this.encodeUnreserved(n),i?this.encodeUnreserved(i)+"="+n:n},t.prototype.isDefined=function(r){return r!=null},t.prototype.isKeyOperator=function(r){return r===";"||r==="&"||r==="?"},t.prototype.getValues=function(r,n,i,o){var s=r[i],l=[];if(this.isDefined(s)&&s!=="")if(typeof s=="string"||typeof s=="number"||typeof s=="boolean")s=s.toString(),o&&o!=="*"&&(s=s.substring(0,parseInt(o,10))),l.push(this.encodeValue(n,s,this.isKeyOperator(n)?i:null));else if(o==="*")Array.isArray(s)?s.filter(this.isDefined).forEach(function(u){l.push(this.encodeValue(n,u,this.isKeyOperator(n)?i:null))},this):Object.keys(s).forEach(function(u){this.isDefined(s[u])&&l.push(this.encodeValue(n,s[u],u))},this);else{var c=[];Array.isArray(s)?s.filter(this.isDefined).forEach(function(u){c.push(this.encodeValue(n,u))},this):Object.keys(s).forEach(function(u){this.isDefined(s[u])&&(c.push(this.encodeUnreserved(u)),c.push(this.encodeValue(n,s[u].toString())))},this),this.isKeyOperator(n)?l.push(this.encodeUnreserved(i)+"="+c.join(",")):c.length!==0&&l.push(c.join(","))}else n===";"?this.isDefined(s)&&l.push(this.encodeUnreserved(i)):s===""&&(n==="&"||n==="?")?l.push(this.encodeUnreserved(i)+"="):s===""&&l.push("");return l},t.prototype.parse=function(r){var n=this,i=["+","#",".","/",";","?","&"];return{expand:function(o){return r.replace(/\{([^\{\}]+)\}|([^\{\}]+)/g,function(s,l,c){if(l){var u=null,d=[];if(i.indexOf(l.charAt(0))!==-1&&(u=l.charAt(0),l=l.substr(1)),l.split(/,/g).forEach(function(m){var g=/([^:\*]*)(?::(\d+)|(\*))?/.exec(m);d.push.apply(d,n.getValues(o,u,g[1],g[2]||g[3]))}),u&&u!=="+"){var p=",";return u==="?"?p="&":u!=="#"&&(p=u),(d.length!==0?u:"")+d.join(p)}else return d.join(",")}else return n.encodeReserved(c)})}}},new t})})(K6)),K6.exports}var F_e=H_e();const V6=Vr(F_e);function H6(e,a=!1){let t=e;a&&t.startsWith("//")&&(t="http:"+e);try{return URL?.parse?URL?.parse(t):new URL(t)}catch(r){return console.error(`Invalid URL: ${t}`,r),null}}function G_e(e){try{const a=new URL(e);let t=a.pathname;if(t.endsWith("/"))return a.origin+t;const r=t.lastIndexOf("/");return r!==-1?(t=t.substring(0,r+1),a.origin+t):a.origin+"/"}catch(a){console.error(`Invalid URL: ${e}`,a);return}}function qJ(e,a){const t={};for(const r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=a(e[r],r,e));return t}function q_e(e,a){const t=[],r=n=>{for(const i of n)t.push(i),i[a]&&r(i[a])};return r(e),t}function JJ(e){return e.endsWith("/")?e.substring(0,e.length-1):e}function F6(e){return!isNaN(parseFloat(e))&&isFinite(e)}const UJ=e=>Array.isArray(e)&&e.some(a=>Uo(a)),WJ=e=>e.filter(a=>!!a),J_e=e=>Uo(e)&&!Array.isArray(e);function ZJ(e){return/(?:^[a-z][a-z0-9+.-]*:|\/\/)/i.test(e)}function U_e(e,a){let t;if(a.startsWith("//"))t=`${H6(e,!0)?.protocol||"https:"}${a}`;else if(ZJ(a))t=a;else if(!a.startsWith("/"))t=JJ(e)+"/"+a;else{const r=H6(e);r?(r.pathname=a,t=r.toString()):t=a}return JJ(t)}function W_e(e){return e.charAt(0).toUpperCase()+e.slice(1)}function Z_e(e){try{if(!e)return"";const a=new URL(e);return a.search="",a.hash="",a.toString()}catch{return e}}function Q_e(e){return e.replace(/&#(\d+);/g,(a,t)=>String.fromCharCode(parseInt(t,10))).replace(/&/g,"&").replace(/"/g,'"')}function G6(e){return e&&e.replace(/#/g,"_").toLowerCase()}function QJ(e){return Uc?window?.REFERENCE_DOCS_OPTIONS?.[e]:null}const Lp=e=>om(e)?e:e?.raw,di=(e,a)=>{const t=e?.[`x-parsed-md-${a}`]||e?.[a];if(!t)return;if(!e?.[`x-parsed-md-${a}`]&&a!=="x-enumDescriptions")return e?.[a];if(a!=="x-enumDescriptions")return X_e(e,a);let r={};for(const n in t)n.startsWith("x-parsed-md")||(r[n]=t?.[`x-parsed-md-${n}`]||t?.[n]);return Object.keys(r).length?r:t};function XJ(e){return e.name||e.description}function X_e(e,a){const t=e?.[`x-parsed-md-${a}`]||e?.[a];return t?.raw?t:{result:t?.result||e?.[a]?.result||e?.[a],raw:e?.[a]}}function Y_e(e,a){return a===e.length-1}function eLe(e,a){const t=Object.keys(e);return t.indexOf(a)===t.length-1}var q6=(e=>(e.ON_DEEP_LINK_CLICK="onDeepLinkClick",e.HOOKS="hooks",e))(q6||{}),fa=(e=>(e.OCTET_STREAM="application/octet-stream",e.MULTIPART="multipart/form-data",e.URL_ENCODED="application/x-www-form-urlencoded",e.JSON="application/json",e.XML="application/xml",e))(fa||{});const aLe="data-section-id",YJ=0,tLe="other",Ak="webhooks",dm={NOT_LOADED:"NOT_LOADED",LOADING:"LOADING",LOADED:"LOADED"};var J6={exports:{}},rLe=J6.exports,eU;function nLe(){return eU||(eU=1,(function(e,a){(function(t,r,n){e.exports=n(),e.exports.default=n()})("slugify",rLe,function(){var t=JSON.parse(`{"$":"dollar","%":"percent","&":"and","<":"less",">":"greater","|":"or","\xA2":"cent","\xA3":"pound","\xA4":"currency","\xA5":"yen","\xA9":"(c)","\xAA":"a","\xAE":"(r)","\xBA":"o","\xC0":"A","\xC1":"A","\xC2":"A","\xC3":"A","\xC4":"A","\xC5":"A","\xC6":"AE","\xC7":"C","\xC8":"E","\xC9":"E","\xCA":"E","\xCB":"E","\xCC":"I","\xCD":"I","\xCE":"I","\xCF":"I","\xD0":"D","\xD1":"N","\xD2":"O","\xD3":"O","\xD4":"O","\xD5":"O","\xD6":"O","\xD8":"O","\xD9":"U","\xDA":"U","\xDB":"U","\xDC":"U","\xDD":"Y","\xDE":"TH","\xDF":"ss","\xE0":"a","\xE1":"a","\xE2":"a","\xE3":"a","\xE4":"a","\xE5":"a","\xE6":"ae","\xE7":"c","\xE8":"e","\xE9":"e","\xEA":"e","\xEB":"e","\xEC":"i","\xED":"i","\xEE":"i","\xEF":"i","\xF0":"d","\xF1":"n","\xF2":"o","\xF3":"o","\xF4":"o","\xF5":"o","\xF6":"o","\xF8":"o","\xF9":"u","\xFA":"u","\xFB":"u","\xFC":"u","\xFD":"y","\xFE":"th","\xFF":"y","\u0100":"A","\u0101":"a","\u0102":"A","\u0103":"a","\u0104":"A","\u0105":"a","\u0106":"C","\u0107":"c","\u010C":"C","\u010D":"c","\u010E":"D","\u010F":"d","\u0110":"DJ","\u0111":"dj","\u0112":"E","\u0113":"e","\u0116":"E","\u0117":"e","\u0118":"e","\u0119":"e","\u011A":"E","\u011B":"e","\u011E":"G","\u011F":"g","\u0122":"G","\u0123":"g","\u0128":"I","\u0129":"i","\u012A":"i","\u012B":"i","\u012E":"I","\u012F":"i","\u0130":"I","\u0131":"i","\u0136":"k","\u0137":"k","\u013B":"L","\u013C":"l","\u013D":"L","\u013E":"l","\u0141":"L","\u0142":"l","\u0143":"N","\u0144":"n","\u0145":"N","\u0146":"n","\u0147":"N","\u0148":"n","\u014C":"O","\u014D":"o","\u0150":"O","\u0151":"o","\u0152":"OE","\u0153":"oe","\u0154":"R","\u0155":"r","\u0158":"R","\u0159":"r","\u015A":"S","\u015B":"s","\u015E":"S","\u015F":"s","\u0160":"S","\u0161":"s","\u0162":"T","\u0163":"t","\u0164":"T","\u0165":"t","\u0168":"U","\u0169":"u","\u016A":"u","\u016B":"u","\u016E":"U","\u016F":"u","\u0170":"U","\u0171":"u","\u0172":"U","\u0173":"u","\u0174":"W","\u0175":"w","\u0176":"Y","\u0177":"y","\u0178":"Y","\u0179":"Z","\u017A":"z","\u017B":"Z","\u017C":"z","\u017D":"Z","\u017E":"z","\u018F":"E","\u0192":"f","\u01A0":"O","\u01A1":"o","\u01AF":"U","\u01B0":"u","\u01C8":"LJ","\u01C9":"lj","\u01CB":"NJ","\u01CC":"nj","\u0218":"S","\u0219":"s","\u021A":"T","\u021B":"t","\u0259":"e","\u02DA":"o","\u0386":"A","\u0388":"E","\u0389":"H","\u038A":"I","\u038C":"O","\u038E":"Y","\u038F":"W","\u0390":"i","\u0391":"A","\u0392":"B","\u0393":"G","\u0394":"D","\u0395":"E","\u0396":"Z","\u0397":"H","\u0398":"8","\u0399":"I","\u039A":"K","\u039B":"L","\u039C":"M","\u039D":"N","\u039E":"3","\u039F":"O","\u03A0":"P","\u03A1":"R","\u03A3":"S","\u03A4":"T","\u03A5":"Y","\u03A6":"F","\u03A7":"X","\u03A8":"PS","\u03A9":"W","\u03AA":"I","\u03AB":"Y","\u03AC":"a","\u03AD":"e","\u03AE":"h","\u03AF":"i","\u03B0":"y","\u03B1":"a","\u03B2":"b","\u03B3":"g","\u03B4":"d","\u03B5":"e","\u03B6":"z","\u03B7":"h","\u03B8":"8","\u03B9":"i","\u03BA":"k","\u03BB":"l","\u03BC":"m","\u03BD":"n","\u03BE":"3","\u03BF":"o","\u03C0":"p","\u03C1":"r","\u03C2":"s","\u03C3":"s","\u03C4":"t","\u03C5":"y","\u03C6":"f","\u03C7":"x","\u03C8":"ps","\u03C9":"w","\u03CA":"i","\u03CB":"y","\u03CC":"o","\u03CD":"y","\u03CE":"w","\u0401":"Yo","\u0402":"DJ","\u0404":"Ye","\u0406":"I","\u0407":"Yi","\u0408":"J","\u0409":"LJ","\u040A":"NJ","\u040B":"C","\u040F":"DZ","\u0410":"A","\u0411":"B","\u0412":"V","\u0413":"G","\u0414":"D","\u0415":"E","\u0416":"Zh","\u0417":"Z","\u0418":"I","\u0419":"J","\u041A":"K","\u041B":"L","\u041C":"M","\u041D":"N","\u041E":"O","\u041F":"P","\u0420":"R","\u0421":"S","\u0422":"T","\u0423":"U","\u0424":"F","\u0425":"H","\u0426":"C","\u0427":"Ch","\u0428":"Sh","\u0429":"Sh","\u042A":"U","\u042B":"Y","\u042C":"","\u042D":"E","\u042E":"Yu","\u042F":"Ya","\u0430":"a","\u0431":"b","\u0432":"v","\u0433":"g","\u0434":"d","\u0435":"e","\u0436":"zh","\u0437":"z","\u0438":"i","\u0439":"j","\u043A":"k","\u043B":"l","\u043C":"m","\u043D":"n","\u043E":"o","\u043F":"p","\u0440":"r","\u0441":"s","\u0442":"t","\u0443":"u","\u0444":"f","\u0445":"h","\u0446":"c","\u0447":"ch","\u0448":"sh","\u0449":"sh","\u044A":"u","\u044B":"y","\u044C":"","\u044D":"e","\u044E":"yu","\u044F":"ya","\u0451":"yo","\u0452":"dj","\u0454":"ye","\u0456":"i","\u0457":"yi","\u0458":"j","\u0459":"lj","\u045A":"nj","\u045B":"c","\u045D":"u","\u045F":"dz","\u0490":"G","\u0491":"g","\u0492":"GH","\u0493":"gh","\u049A":"KH","\u049B":"kh","\u04A2":"NG","\u04A3":"ng","\u04AE":"UE","\u04AF":"ue","\u04B0":"U","\u04B1":"u","\u04BA":"H","\u04BB":"h","\u04D8":"AE","\u04D9":"ae","\u04E8":"OE","\u04E9":"oe","\u0E3F":"baht","\u10D0":"a","\u10D1":"b","\u10D2":"g","\u10D3":"d","\u10D4":"e","\u10D5":"v","\u10D6":"z","\u10D7":"t","\u10D8":"i","\u10D9":"k","\u10DA":"l","\u10DB":"m","\u10DC":"n","\u10DD":"o","\u10DE":"p","\u10DF":"zh","\u10E0":"r","\u10E1":"s","\u10E2":"t","\u10E3":"u","\u10E4":"f","\u10E5":"k","\u10E6":"gh","\u10E7":"q","\u10E8":"sh","\u10E9":"ch","\u10EA":"ts","\u10EB":"dz","\u10EC":"ts","\u10ED":"ch","\u10EE":"kh","\u10EF":"j","\u10F0":"h","\u1E80":"W","\u1E81":"w","\u1E82":"W","\u1E83":"w","\u1E84":"W","\u1E85":"w","\u1E9E":"SS","\u1EA0":"A","\u1EA1":"a","\u1EA2":"A","\u1EA3":"a","\u1EA4":"A","\u1EA5":"a","\u1EA6":"A","\u1EA7":"a","\u1EA8":"A","\u1EA9":"a","\u1EAA":"A","\u1EAB":"a","\u1EAC":"A","\u1EAD":"a","\u1EAE":"A","\u1EAF":"a","\u1EB0":"A","\u1EB1":"a","\u1EB2":"A","\u1EB3":"a","\u1EB4":"A","\u1EB5":"a","\u1EB6":"A","\u1EB7":"a","\u1EB8":"E","\u1EB9":"e","\u1EBA":"E","\u1EBB":"e","\u1EBC":"E","\u1EBD":"e","\u1EBE":"E","\u1EBF":"e","\u1EC0":"E","\u1EC1":"e","\u1EC2":"E","\u1EC3":"e","\u1EC4":"E","\u1EC5":"e","\u1EC6":"E","\u1EC7":"e","\u1EC8":"I","\u1EC9":"i","\u1ECA":"I","\u1ECB":"i","\u1ECC":"O","\u1ECD":"o","\u1ECE":"O","\u1ECF":"o","\u1ED0":"O","\u1ED1":"o","\u1ED2":"O","\u1ED3":"o","\u1ED4":"O","\u1ED5":"o","\u1ED6":"O","\u1ED7":"o","\u1ED8":"O","\u1ED9":"o","\u1EDA":"O","\u1EDB":"o","\u1EDC":"O","\u1EDD":"o","\u1EDE":"O","\u1EDF":"o","\u1EE0":"O","\u1EE1":"o","\u1EE2":"O","\u1EE3":"o","\u1EE4":"U","\u1EE5":"u","\u1EE6":"U","\u1EE7":"u","\u1EE8":"U","\u1EE9":"u","\u1EEA":"U","\u1EEB":"u","\u1EEC":"U","\u1EED":"u","\u1EEE":"U","\u1EEF":"u","\u1EF0":"U","\u1EF1":"u","\u1EF2":"Y","\u1EF3":"y","\u1EF4":"Y","\u1EF5":"y","\u1EF6":"Y","\u1EF7":"y","\u1EF8":"Y","\u1EF9":"y","\u2018":"'","\u2019":"'","\u201C":"\\"","\u201D":"\\"","\u2020":"+","\u2022":"*","\u2026":"...","\u20A0":"ecu","\u20A2":"cruzeiro","\u20A3":"french franc","\u20A4":"lira","\u20A5":"mill","\u20A6":"naira","\u20A7":"peseta","\u20A8":"rupee","\u20A9":"won","\u20AA":"new shequel","\u20AB":"dong","\u20AC":"euro","\u20AD":"kip","\u20AE":"tugrik","\u20AF":"drachma","\u20B0":"penny","\u20B1":"peso","\u20B2":"guarani","\u20B3":"austral","\u20B4":"hryvnia","\u20B5":"cedi","\u20B8":"kazakhstani tenge","\u20B9":"indian rupee","\u20BA":"turkish lira","\u20BD":"russian ruble","\u20BF":"bitcoin","\u2120":"sm","\u2122":"tm","\u2202":"d","\u2206":"delta","\u2211":"sum","\u221E":"infinity","\u2665":"love","\u5143":"yuan","\u5186":"yen","\uFDFC":"rial"}`),r=JSON.parse('{"de":{"\xC4":"AE","\xE4":"ae","\xD6":"OE","\xF6":"oe","\xDC":"UE","\xFC":"ue","%":"prozent","&":"und","|":"oder","\u2211":"summe","\u221E":"unendlich","\u2665":"liebe"},"vi":{"\u0110":"D","\u0111":"d"},"fr":{"%":"pourcent","&":"et","<":"plus petit",">":"plus grand","|":"ou","\xA2":"centime","\xA3":"livre","\xA4":"devise","\u20A3":"franc","\u2211":"somme","\u221E":"infini","\u2665":"amour"}}');function n(i,o){if(typeof i!="string")throw new Error("slugify: string argument expected");o=typeof o=="string"?{replacement:o}:o||{};var s=r[o.locale]||{},l=o.replacement===void 0?"-":o.replacement,c=i.split("").reduce(function(u,d){return u+(s[d]||t[d]||d).replace(o.remove||/[^\w\s$*_+~.()'"!\-:@]+/g,"")},"").trim().replace(new RegExp("[\\s"+l+"]+","g"),l);return o.lower&&(c=c.toLowerCase()),o.strict&&(c=c.replace(new RegExp("[^a-zA-Z0-9"+l+"]","g"),"").replace(new RegExp("[\\s"+l+"]+","g"),l)),c}return n.extend=function(i){for(var o in i)t[o]=i[o]},n})})(J6)),J6.exports}var iLe=nLe();const oLe=Vr(iLe);function sLe(e){return e.split("").map(a=>a+"\u0335").join("")}function aU(e){return e.replace(/[.[\]]/g,a=>({".":"%2e","[":"%5b","]":"%5d"})[a]||"")}function Pk(e){return e.replace(/\\/g,"%5C")}function lLe(e){return e.replace(/%/g,"")}function Si(e){try{return decodeURIComponent(e)}catch(a){return console.error(`Decoding failed: ${e}`,a),e}}function zg(e){return oLe(e)||e.toString().toLowerCase().replace(/\s+/g,"-").replace(/&/g,"-and-").replace(/--+/g,"-").replace(/^-+/,"").replace(/-+$/,"")}function tU(e,a={}){try{return JSON.parse(e)}catch{return a}}function rU(e){return typeof e=="string"&&/\dxx/i.test(e)}function cLe(e){return e==="default"||F6(e)||rU(e)}function nU(e,a=!1){if(e==="default")return a?"error":"success";let t=typeof e=="string"?parseInt(e,10):e;if(rU(e)&&(t*=100),t<100||t>599)throw new Error("invalid HTTP code");let r="success";return t>=300&&t<400?r="redirect":t>=400?r="error":t<200&&(r="info"),r}const uLe={get:!0,post:!0,put:!0,head:!0,patch:!0,delete:!0,options:!0,$ref:!0};function iU(e){return e in uLe}function oU(e){const{operationId:a,pathName:t}=e,r=Lp(di(e,"description"));return Lp(di(e,"summary"))||a||r&&r.substring(0,50)||t||"<no summary>"}function sU(e,a){return a?.id?$i(a.id,G6(e.operationId?e.operationId:U6(e.pointer))).toLowerCase():e.tags?.length?G6(e.operationId?e.operationId:U6(e.pointer)):G6(e.operationId?$i(tLe,e.operationId):U6(e.pointer))}function U6(e){return e?.startsWith("/")?e.slice(1,e.length):e}const lU={multipleOf:"number",maximum:"number",exclusiveMaximum:"number",minimum:"number",exclusiveMinimum:"number",maxLength:"string",minLength:"string",pattern:"string",contentEncoding:"string",contentMediaType:"string",items:"array",maxItems:"array",minItems:"array",uniqueItems:"array",maxProperties:"object",minProperties:"object",required:"object",additionalProperties:"object",unevaluatedProperties:"object",patternProperties:"object",properties:"object"};function dLe(e){if(e.type!==void 0&&!Array.isArray(e.type))return e.type;const a=Object.keys(lU);for(const t of a){const r=lU[t];if(e[t]!==void 0)return r}return"any"}function cU(e,a=e.type){if(e["x-circular-ref"]||e["x-complex"])return!0;if(e.oneOf!==void 0||e.anyOf!==void 0||e.if&&e.then||e.if&&e.else)return!1;let t=!0;const r=Array.isArray(a);return(a==="object"||r&&a?.includes("object"))&&(t=e.properties!==void 0?Object.keys(e.properties).length===0:e.additionalProperties===void 0&&e.unevaluatedProperties===void 0&&e.patternProperties===void 0),Array.isArray(e.items)||Array.isArray(e.prefixItems)?!1:(e.items!==void 0&&typeof e.items!="boolean"&&(a==="array"||r&&a?.includes("array"))&&(t=cU(e.items,e.items.type)),t)}function W6(e){return e.search(/json/i)!==-1}function uU(e){return e?.search(/xml/i)!==-1}function dU(e){return e===fa.URL_ENCODED}function pLe(e){return e===fa.MULTIPART}function gS(e,a,t){return Array.isArray(e)?e.map(r=>r.toString()).join(t):typeof e=="object"?Object.keys(e).map(r=>`${r}${t}${e[r]}`).join(t):a+"="+e.toString()}function pU(e,a){return Array.isArray(e)?(console.warn("deepObject style cannot be used with array value:"+e.toString()),""):typeof e=="object"?Object.keys(e).map(t=>e[t]?`${a}[${t}]=${e[t]}`:void 0).filter(Boolean).join("&"):(console.warn("deepObject style cannot be used with non-object value:"+e.toString()),"")}function Mk(e,a,t){const r="__redoc_param_name__",n=a?"*":"";return V6.parse(`{?${r}${n}}`).expand({[r]:t}).substring(1).replace(/__redoc_param_name__/g,e)}function hU(e,a){const t=e?"*":"",r="__redoc_param_name__",n=V6.parse(`{${r}${t}}`);return Si(n.expand({[r]:a}))}function hLe(e,a={}){if(Array.isArray(e))throw new Error("Payload must have fields: "+e.toString());return Object.keys(e).map(t=>{const r=e[t],{style:n="form",explode:i=!0}=a[t]||{};switch(n){case"form":return Mk(t,i,r);case"spaceDelimited":return gS(r,t,"%20");case"pipeDelimited":return gS(r,t,"|");case"deepObject":return pU(r,t);default:return console.warn("Incorrect or unsupported encoding style: "+n),""}}).join("&")}function mLe(e,a,t,r){const n=t?"*":"";let i="";a==="label"?i=".":a==="matrix"&&(i=";");const o="__redoc_param_name__";return V6.parse(`{${i}${o}${n}}`).expand({[o]:r}).replace(/__redoc_param_name__/g,e)}function fLe(e,a,t,r){const n=i=>{switch(a){case"form":return Mk(e,t,i);case"spaceDelimited":return!Array.isArray(i)&&typeof i!="object"?(console.warn("The style spaceDelimited is applicable to arrays or objects"),""):t?Mk(e,t,i):gS(r,e,"%20");case"pipeDelimited":return!Array.isArray(i)&&typeof i!="object"?(console.warn("The style pipeDelimited is applicable to arrays or objects"),""):t?Mk(e,t,i):gS(r,e,"|");case"deepObject":return!t||Array.isArray(i)||typeof i!="object"?(console.warn("The style deepObject is only applicable for objects with explode=true"),""):pU(i,e);case"simple":return hU(t,r);default:return console.warn("Unexpected style for query: "+a),""}};return UJ(r)&&(r=WJ(r).map(i=>n(i))),n(r)}function gLe(e,a,t){switch(e){case"simple":return hU(a,t);default:return console.warn("Unexpected style for header: "+e),""}}function vLe(e,a,t,r){switch(a){case"form":return Mk(e,t,r);default:return console.warn("Unexpected style for cookie: "+a),""}}function mU(e,a){return W6(a)?JSON.stringify(e):(console.warn(`Parameter serialization as ${a} is not supported`),"")}function vS(e,a){const{name:t,style:r,explode:n=!1,serializationMime:i}=e;if(i)switch(e.in){case"path":case"header":return mU(a,i);case"cookie":case"query":return`${t}=${mU(a,i)}`;default:return console.warn("Unexpected parameter location: "+e.in),""}if(!r)return console.warn(`Missing style attribute or content for parameter ${t}`),"";switch(e.in){case"path":return mLe(t,r,n,a);case"query":return fLe(t,r,n,a);case"header":return gLe(r,n,a);case"cookie":return vLe(t,r,n,a);default:return console.warn("Unexpected parameter location: "+e.in),""}}function bLe(e){return e.search(/xml/i)!==-1?"xml":"clike"}const fU=/^#\/components\/(schemas|pathItems)\/([^/]+)$/;function gU(e){return fU.test(e||"")}function vU(e){return e?.match(fU)?.pop()}function yLe(e){if(e===void 0)return;const a=e.toString(10);return/^0\.0*1$/.test(a)?`decimal places <= ${a.split(".")[1].length}`:`multiple of ${a}`}function Z6(e,a,t){let r;return a!==void 0&&t!==void 0?a===t?r=`= ${a} ${e}`:r=`[ ${a} .. ${t} ] ${e}`:t!==void 0?r=`<= ${t} ${e}`:a!==void 0&&(a===1?r="non-empty":r=`>= ${a} ${e}`),r}function kLe(e){const a=typeof e.exclusiveMinimum=="number"?Math.min(e.exclusiveMinimum,e.minimum??1/0):e.minimum,t=typeof e.exclusiveMaximum=="number"?Math.max(e.exclusiveMaximum,e.maximum??-1/0):e.maximum,r=typeof e.exclusiveMinimum=="number"||e.exclusiveMinimum,n=typeof e.exclusiveMaximum=="number"||e.exclusiveMaximum;if(a!==void 0&&t!==void 0)return`${r?"( ":"[ "}${a} .. ${t}${n?" )":" ]"}`;if(t!==void 0)return`${n?"< ":"<= "}${t}`;if(a!==void 0)return`${r?"> ":">= "}${a}`}function bU(e){const a=[],t=Z6("characters",e.minLength,e.maxLength);t!==void 0&&a.push(t);const r=Z6("items",e.minItems,e.maxItems);r!==void 0&&a.push(r);const n=Z6(e.minProperties===1&&e.maxProperties===1?"property":"properties",e.minProperties,e.maxProperties);n!==void 0&&a.push(n);const i=yLe(e.multipleOf);i!==void 0&&a.push(i);const o=kLe(e);return o!==void 0&&a.push(o),e.uniqueItems&&a.push("unique"),a}function yU(e,a=[]){const t=[],r=[],n=[];return e.forEach(i=>{i.required?a.includes(i.name)?r.push(i):n.push(i):t.push(i)}),r.sort((i,o)=>a.indexOf(i.name)-a.indexOf(o.name)),[...r,...n,...t]}function kU(e){return e.sort((a,t)=>Number(a.deprecated)-Number(t.deprecated))}function xLe(e,a=[],t=[],{pathPointer:r,operationPointer:n}){const i={};t.forEach(l=>{({resolved:l}=e.deref(l)),i[l.name+"_"+l.in]=!0});const o=a.map((l,c)=>({paramOrRef:l,pointer:yr.join(r,["parameters",String(c)])})).filter(({paramOrRef:l})=>({resolved:l}=e.deref(l),!i[l.name+"_"+l.in])),s=t.map((l,c)=>({paramOrRef:l,pointer:yr.join(n,["parameters",String(c)])}));return[...o,...s]}function Tk(e,a){const t=e===void 0?Z_e((()=>{if(!Uc)return globalThis.SSR_HOSTNAME||"";const r=window.location.href;return r.endsWith(".html")?rt.dirname(r):r})()):ZJ(e)?G_e(e):rt.dirname(e);return a.length===0&&(a=[{url:"/"}]),a.map(r=>({...r,url:t?U_e(t,r.url):r.url,description:r.description||""}))}const wLe=e=>({delete:"del",options:"opts"})[e]||e;function zLe(e){return e in{"x-circular-ref":!0,"x-complex":!0,"x-parentRefs":!0,"x-refsStack":!0,"x-codeSamples":!0,"x-displayName":!0,"x-examples":!0,"x-logo":!0,"x-nullable":!0,"x-servers":!0,"x-tagGroups":!0,"x-traitTag":!0,"x-additionalPropertiesName":!0,"x-explicitMappingOnly":!0,"x-enumDescriptions":!0,"x-badges":!0,"x-hideReplay":!0,"x-feedback":!0,"x-assertionType":!0,"x-rbac":!0}||e.startsWith("x-parsed-md-")}function Q6(e,a){return Object.keys(e).filter(t=>a===!0?t.startsWith("x-")&&!zLe(t):t.startsWith("x-")&&a.indexOf(t)>-1).reduce((t,r)=>(t[r]=e[r],t),{})}function SLe(e){return e.split(" or ").map(a=>a.replace(/^(string|object|number|integer|array|boolean)s?( ?.*)/,"$1s$2")).join(" or ")}function xU(e){let a=e.content;const t=e["x-examples"],r=e["x-example"];if(t){a={...a};for(const n of Object.keys(t)){const i=t[n];a[n]={...a[n],examples:i}}}else if(r){a={...a};for(const n of Object.keys(r)){const i=r[n];a[n]={...a[n],example:i}}}return a}function Xs(e,a){return e===void 0?a||!1:typeof e=="string"?e!=="false":e}function CLe(e,a=0){return typeof e=="string"?parseInt(e,10):typeof e=="number"?e:a}function wU(e,a=0){return typeof e=="string"?parseInt(e,10):typeof e=="number"?Math.ceil(e):a}function zU(e,a){return e===void 0?a:e==="all"?1/0:wU(e,a)}const jLe=Object.entries({fontSize:"font-size",fontWeight:"font-weight",fontFamily:"font-family",lineHeight:"line-height",color:"text-color",textTransform:"text-transform"});function OLe(e,a){const t={};for(const[r,n]of jLe){const i=`--${e}-${n}`,o="";t[r]=`var(${i}${o})`}return t}function SU(e,a){return Je`
|
|
6020
6020
|
${OLe(e)}
|
|
6021
|
-
`}function Yc(e,a){Uc&&window.sessionStorage.setItem("redoc."+e,a)}function X6(e){return Uc&&window.sessionStorage.getItem("redoc."+e)||""}function ALe(e,a){e=aU(e),Yc(`auth.${e}.variants`,JSON.stringify(a))}function PLe(e,a={}){return{raw:a[e+tt.APIKey],password:a[e+tt.Password],username:a[e+tt.Username],token:a[e+tt.Token]?{access_token:a[e+tt.Token]}:void 0,client_id:a[e+tt.ClientId],client_secret:a[e+tt.ClientSecret],scopes:X6(`auth.${e}.scopes`)}}function MLe(e,a){e=aU(e),typeof a=="string"?Yc("auth."+e,a):a&&(Yc(`auth.${e}.password`,a.password||""),Yc(`auth.${e}.username`,a.username||""),Yc(`auth.${e}.token`,a.token&&JSON.stringify(a.token)||""),Yc(`auth.${e}.client_id`,a.client_id||""),Yc(`auth.${e}.client_secret`,a.client_secret||""),Yc(`auth.${e}.scopes`,a.scopes&&JSON.stringify(a.scopes)||""))}function CU(e,a){try{return JSON.parse(X6(`${e}.${a}`))}catch{return null}}function TLe(e,a,t){Yc(`${e}.${a}`,JSON.stringify(t))}function BLe(e,a){return Object.fromEntries(Object.entries(e).map(([t,r])=>[t,a(r,t)]))}const jU=(e,...a)=>a.reduce((t,r)=>n=>t(r(n)),e);function Y6(e){if(!e)return"";if(!om(e))return e?.result?{result:ELe(Mr.Ast.fromJSON(JSON.stringify(e.result)))||"",raw:Y6(e.raw)}:e;const a=new RegExp("^#{1,6}?\\s+","m"),t=e.search(a);return t>-1?e.substring(0,t):e}function ELe(e){if(Array.isArray(e)){const t=e.findIndex(r=>r.type==="heading");return t===-1?e:e.slice(0,t)}if(!e.children||!Array.isArray(e.children))return;const a=e.children.findIndex(t=>t.type==="heading");return a===-1||(e.children=e.children.slice(0,a)),e}function Bk(e,a){return a?Si(e.pathname+e.hash).includes(Si(a.toLowerCase())):!1}function _Le(e,a=""){const t=Si(a.toLowerCase());return Si(e.pathname)===t||Si(e.hash)===t||Si(e.pathname+e.hash)===t}function Ek(e){return e.length>1&&e.endsWith("/")&&(e=e.slice(0,-1)),e.startsWith("/")||(e="/"+e),e}class LLe{parse(a){const t={};if(!a)return t;const r=a.startsWith("?")?a.substring(1).split("&"):a.split("&");for(const n of r){const[i,o]=n.split("=");if(i&&o){const s=Si(i),l=Si(o);if(s in t)Array.isArray(t[s])?t[s].push(l):t[s]=[t[s],l];else{const c=[",","|"].find(u=>l.includes(u));t[s]=c?l.split(c):l}}}return t}stringify(a,t={encode:!0,sort:!0}){const r=[];for(const[n,i]of Object.entries(a))if(Object.prototype.hasOwnProperty.call(a,n)){const o=t.encode?encodeURIComponent(n):n;if(Array.isArray(i)){for(const s of i)if(s){const l=t.encode?encodeURIComponent(s):s;r.push(`${o}=${l}`)}}else if(i){const s=t.encode?encodeURIComponent(i):i;r.push(`${o}=${s}`)}}return t.sort&&r.sort(),r.join("&")}}const _k=new LLe;function RLe(e){let{url:a,variables:t}=e;if(t)for(const r in t){const n=t[r];if(n.default){const i=new RegExp(`{${r}}`,"g");a=a.replace(i,n.default)}}return a}function NLe(e,a){return e.length===a.length&&e.every((t,r)=>t===a[r])}function OU(e){return e?[...e.fields||[],...e.oneOf?.flatMap(a=>a.fields||[])||[]].some(({schema:a})=>!a.isPrimitive&&!a.isCircular):!1}function DLe(e,a){Object.keys(a).length!==0&&(BU(a)?(AU(e,a),PU(e,a.security),MU(e,a.envVariables),TU(e,a.serverVariables)):ILe(e,a))}function $Le(e,a){if(!a)return;const{in:t,name:r}=e;if(BU(a)){const n=a,i={header:n.headers,query:n.query,path:n.path,cookie:n.cookie};t&&i[t]?.[r]&&(e.example=i[t][r])}else Object.entries(a).forEach(([n,i])=>{const o=i;if(!o)return;const s={header:o.headers,query:o.query,path:o.path,cookie:o.cookie};t&&s[t]?.[r]&&(e.serverValues||(e.serverValues={}),e.serverValues[n]={example:s[t][r]})})}function AU(e,a,t){if(!e.requestBody||!a?.body)return;const r=e.requestBody.content;if(!r?.mediaTypes)return;const n=(i,o)=>{i[o]&&Object.keys(i[o]).forEach(s=>{const l=i[o]?.[s]?.value;let c;if(Uo(l)?c=EU(l,a.body):c=a.body,!!c)if(t){const u=i[o][s];u.serverValues||(u.serverValues={}),u.serverValues[t]={value:c,rawValue:c},i[o][s]={...u,mime:i.name}}else i[o][s]={value:c,rawValue:c,mime:i.name}})};for(const i of r.mediaTypes)n(i,"examples"),n(i,"formExamples");return e}function PU(e,a,t){!a||!e.security.length||e.security.forEach(r=>{t?r.schemes.forEach(n=>{n.serverValues||(n.serverValues={});const i=_U(n,a);n.serverValues[t]=i}):r.schemes.forEach(n=>{const i=_U(n,a);Object.assign(n,i)})})}function ILe(e,a){e.servers.forEach(t=>{if(a[t.url]){const r=a[t.url];r&&(AU(e,r,t.url),PU(e,r.security,t.url),MU(e,r.envVariables,t.url),TU(e,r.serverVariables,t.url))}})}function MU(e,a,t){!a||Object.keys(a).length===0||(e.envVariables||(e.envVariables={}),t?(e.envVariables.serverValues||(e.envVariables.serverValues={}),e.envVariables.serverValues[t]={...e.envVariables.serverValues[t],...a}):e.envVariables.values={...e.envVariables.values,...a})}function TU(e,a,t){if(!(!a||Object.keys(a).length===0))if(t){const r=e.servers.find(n=>n.url===t);if(r){r.variables||(r.variables={});for(const[n,i]of Object.entries(a))r.variables[n]&&(r.variables[n].default=i)}}else e.servers.forEach(r=>{r.variables||(r.variables={});for(const[n,i]of Object.entries(a))r.variables[n]&&(r.variables[n].default=i)})}function BU(e){return!e||typeof e!="object"?!1:"headers"in e||"body"in e||"query"in e||"path"in e||"cookie"in e||"security"in e||"envVariables"in e||"serverVariables"in e}function EU(e,a){if(!e||typeof e!="object")return a;if(Array.isArray(e)&&Array.isArray(a)){if(e.length>0&&typeof e[0]=="object"&&e[0]!==null){const r=Object.keys(e[0]),n=a.filter(i=>typeof i!="object"||i===null?!1:r.some(o=>o in i)&&Object.keys(i).every(o=>r.includes(o)));return n.length>0?n:e}return a}const t=Array.isArray(e)?[...e]:{...e};for(const[r,n]of Object.entries(a))r in e&&(Array.isArray(e[r])||typeof n=="object"&&n!==null&&typeof e[r]=="object"?t[r]=EU(e[r],n):t[r]=n);return t}function _U(e,a){const t={"x-defaultAccessToken":a.token?.access_token,"x-defaultTokenType":a.token?.token_type||"Bearer","x-defaultClientId":a.client_id,"x-defaultClientSecret":a.client_secret,scopes:a.scopes||e.scopes};return e.type==="http"&&e.scheme==="basic"?(t["x-defaultUsername"]=a.username,t["x-defaultPassword"]=a.password,delete t["x-defaultAccessToken"],delete t["x-defaultTokenType"]):e.type==="oauth2"&&!a.token?.access_token&&(delete t["x-defaultAccessToken"],delete t["x-defaultTokenType"]),t}function KLe(){return window.location.origin+FG("/_otel")}const VLe={curl:"curl",JavaScript:"JavaScript",NodeJs:"Node.js",Python:"Python",Java:"Java",CSharp:"C#",PHP:"PHP",Go:"Go",Ruby:"Ruby",R:"R",Payload:"Payload"};function HLe(e){if(typeof e>"u")return!1;if(e==="")return!0;if(typeof e!="string")return e;switch(e){case"true":return!0;case"false":return!1;default:return e.split(",").map(a=>a.trim()).filter(Boolean)}}function FLe(e){if(typeof e=="string"&&!F6(e)){const a=O4(e);a||console.warn("scrollYOffset value is a selector to non-existing element. Using offset 0 by default");const t=a&&a.getBoundingClientRect().bottom||0;return()=>t}else{if(typeof e=="number"||F6(e))return()=>typeof e=="number"?e:parseFloat(e);if(typeof e=="function")return()=>{const a=e();return typeof a!="number"&&console.warn(`scrollYOffset should return number but returned value "${a}" of type ${typeof a}`),a};e!==void 0&&console.warn("Wrong value for scrollYOffset ReDoc option: should be string, number or function")}return()=>0}function GLe(e){const a=Object.values(VLe).map(t=>({lang:t}));return typeof e=="object"&&e!==null?{languages:a,...e}:{languages:a}}function e8(e,a){e={...a,...e,markdocOptions:{...e?.markdocOptions,components:{...a?.markdocOptions?.components,...e?.markdocOptions?.components},tags:{...a?.markdocOptions?.tags,...e?.markdocOptions?.tags},nodes:{...a?.markdocOptions?.nodes,...e?.markdocOptions?.nodes,heading:a?.markdocOptions?.nodes?.heading||e?.markdocOptions?.nodes.heading}}};const t=Array.isArray(e.ignoreNamedSchemas)?e.ignoreNamedSchemas:e.ignoreNamedSchemas?.split(",").map(r=>r.trim());return{downloadUrls:e.downloadUrls,schemaDefinitionsTagName:e.schemaDefinitionsTagName,corsProxyUrl:e.corsProxyUrl&&p4e(e.corsProxyUrl),hideSidebar:Xs(e.hideSidebar,!1),jsonSamplesExpandLevel:zU(e.jsonSamplesExpandLevel,2),generatedSamplesMaxDepth:wU(e.generatedSamplesMaxDepth,8),hideDownloadButtons:Xs(e.hideDownloadButtons,!1),hideInfoMetadata:Xs(e.hideInfoMetadata,!1),hideLoading:Xs(e.hideLoading,!1),hideSchemaTitles:Xs(e.hideSchemaTitles,!1),maxDisplayedEnumValues:CLe(e.maxDisplayedEnumValues),mockServer:e.mockServer?.url?{url:e.mockServer.url,position:e.mockServer.position||"first",description:e.mockServer.description||"Mock server"}:void 0,hideReplay:Xs(e.hideReplay,!1),oAuth2RedirectURI:e.oAuth2RedirectURI||null,onlyRequiredInSamples:Xs(e.onlyRequiredInSamples,!1),onDeepLinkClick:e.onDeepLinkClick||QJ(q6.ON_DEEP_LINK_CLICK),routingBasePath:ui(e.disableRouter)?"":e.routingBasePath&&Ek(e.routingBasePath)||"",schemasExpansionLevel:zU(e.schemasExpansionLevel),feedback:e.feedback||{hide:!1},sortRequiredPropsFirst:Xs(e.sortRequiredPropsFirst,!1),scrollYOffset:FLe(e.scrollYOffset),showExtensions:HLe(e.showExtensions),sanitize:Xs(e.sanitize,!1),skipBundle:Xs(e.skipBundle,!1),ignoreNamedSchemas:new Set(t),markdocOptions:e?.markdocOptions,codeSamples:GLe(e.codeSamples),layout:e.layout||Yr.THREE_PANEL,events:e.events||{},unstable_hooks:e.unstable_hooks||QJ(q6.HOOKS)||{},unstable_skipSamples:Xs(e.unstable_skipSamples,!1),unstable_externalCodeSamples:e.unstable_externalCodeSamples||[],hidePropertiesPrefix:Xs(e?.hidePropertiesPrefix,!1)}}function bS(e,a){return a&&e[e.length-1]!==a?[...e,a]:e}function a8(e,a){return a?e.concat(a):e}class LU{constructor(a,t,r=e8({})){this.options=r,this.definition=Object.assign({},a),this.validate(a),this.definition=a,this.allowMergeRefs=a.openapi.startsWith("3.1");const n=pk?window.location.href:"";om(t)&&(this.definitionUrl=new URL(t,n).href)}definitionUrl;definition;allowMergeRefs=!1;validate(a){if(ui(a.openapi))throw new Error("Document must be valid OpenAPI 3.0.0 definition")}byRef=a=>{let t;if(this.definition){a.charAt(0)!=="#"&&(a="#"+a),a=Si(a);try{t=yr.get(this.definition,a)}catch{}return t||{}}};isRef(a){return a?(a=a,a.$ref!==void 0&&a.$ref!==null):!1}deref(a,t=[],r=!1,n=0){const i=a?.["x-refsStack"];if(t=a8(t,i),n>5)return{resolved:Object.assign({},a,{"x-complex":!0}),refsStack:t};if(this.isRef(a)){const o=vU(a.$ref);if(o&&this.options.ignoreNamedSchemas.has(o))return{resolved:{type:"object",title:o},refsStack:t};let s=this.byRef(a.$ref);if(!s)throw new Error(`Failed to resolve $ref "${a.$ref}"`);return t.includes(a.$ref)?s=Object.assign({},s,{"x-circular-ref":!0}):this.isRef(s)&&(s=this.deref(s,t,r,n).resolved),this.allowMergeRefs&&(s=this.mergeRefs(a,s,r)),{resolved:s,refsStack:bS(t,a.$ref)}}return{resolved:a,refsStack:a8(t,i)}}mergeRefs(a,t,r){const{$ref:n,...i}=a,o=Object.keys(i);if(o.length===0)return{...t,$ref:n};if(r&&o.some(s=>!["description","title","externalDocs","x-refsStack","x-parentRefs","readOnly","writeOnly","x-complex"].includes(s))){const{description:s,title:l,readOnly:c,writeOnly:u,...d}=i;return{allOf:[{description:s,title:l,readOnly:c,writeOnly:u},t,d]}}else return{...t,...i}}mergeAllOf(a,t,r,n="",i=0){if(a["x-circular-ref"])return a;if(a=this.hoistOneOfs(a),a.allOf===void 0)return{absolutePointer:n,...a};let o={...a,"x-parentRefs":[],absolutePointer:yr.join(n,["allOf"]),allOf:void 0,title:i===0?a.title||vU(t):a.title};!ui(o.properties)&&Uo(o.properties)&&(o.properties={...o.properties}),!ui(o.items)&&Uo(o.items)&&(o.items={...o.items});const s=a.allOf.map((l,c)=>{const{resolved:u,refsStack:d}=this.deref(l,r,!0,i),p=l.$ref,m=p||yr.join(n,[String(c)]);if(u["x-complex"])return{$ref:p,refsStack:bS(d,p),schema:{"x-complex":!0},absolutePointer:m};const g=this.mergeAllOf(u,p,d,m,i+1);if(!(g["x-circular-ref"]&&g.allOf))return p&&o["x-parentRefs"]?.push(...g["x-parentRefs"]||[],p),{$ref:p,refsStack:bS(d,p),schema:g,absolutePointer:m}}).filter(Boolean);for(const[l,{schema:c,refsStack:u,absolutePointer:d}]of s.entries()){const{type:p,enum:m,properties:g,items:b,required:y,title:v,description:k,readOnly:z,writeOnly:C,oneOf:w,anyOf:S,"x-circular-ref":O,"x-complex":A,...B}=c||{};if(!(o.type!==p&&!ui(o.type)&&!ui(p)&&!i)){if(ui(p)||(Array.isArray(p)&&Array.isArray(o.type)?o.type=[...p,...o.type]:o.type=p),ui(m)||(Array.isArray(m)&&Array.isArray(o.enum)?o.enum=Array.from(new Set([...m,...o.enum])):o.enum=m),!ui(g)&&Uo(g)){o.properties=o.properties||{};for(const L in g){const q=a8(u,g[L]?.["x-refsStack"]);if(!o.properties[L])o.properties[L]={...g[L],absolutePointer:yr.join(d,["properties",L]),"x-refsStack":q};else if(!O){const N=this.mergeAllOf({allOf:[o.properties[L],g[L]],"x-refsStack":q},t+"/properties/"+L,q,yr.join(d,["allOf",String(l),"properties",L]),i+1);o.properties[L]=N}}}if(!ui(b)&&!O&&!A){const L=typeof o.items=="boolean"?{}:Object.assign({},o.items),q=typeof c.items=="boolean"?{}:Object.assign({},c.items);o.items=this.mergeAllOf({allOf:[L,q]},t+"/items",u,"",i+1)}ui(w)||(o.oneOf=w),ui(S)||(o.anyOf=S),Array.isArray(y)&&(o.required=[...o.required||[],...y]),o={...o,title:o.title||v,description:o.description||k,readOnly:ui(o.readOnly)?z:o.readOnly,writeOnly:ui(o.writeOnly)?C:o.writeOnly,"x-circular-ref":o["x-circular-ref"]||O,"x-complex":o["x-complex"]||A,...B}}}return o}findDerived(a){const t={},r=this.definition.components&&this.definition.components.schemas||{};for(const n in r){const{resolved:i}=this.deref(r[n]);!ui(i.allOf)&&i.allOf.find(o=>!ui(o.$ref)&&a.indexOf(o.$ref)>-1)&&(t["#/components/schemas/"+n]=[i["x-discriminator-value"]||n])}return t}hoistOneOfs(a){if(ui(a.allOf))return a;const{allOf:t,...r}=a;for(let n=0;n<t.length;n++){const{oneOf:i,...o}=t[n];if(i&&Array.isArray(i)){const s=t.slice(0,n),l=t.slice(n+1),c=Object.keys(o).length>0?[o]:[];return{...r,oneOf:i.map(u=>({allOf:[...s,...c,u,...l]}))}}}return a}}function Lk({parser:e,infoOrRef:a,mime:t,encoding:r}){const{resolved:n}=e.deref(a),i=n.value,o=n.value,s=di(n,"summary"),l=di(n,"description");return{value:o,rawValue:i,summary:s,description:l,mime:t,encoding:r}}const RU={path:{style:"simple",explode:!1},query:{style:"form",explode:!0},header:{style:"simple",explode:!1},cookie:{style:"form",explode:!0}};function Rp(e,a,t,r,n,i,o=t){const{resolved:s}=e.deref(a),l=a.kind||"field",c=a.name||s.name,u=s.in,d=!!s.required;let p=s.schema,m,g="",b;if(!p&&s.in&&s.content){g=Object.keys(s.content)[0];const L=s.content[g];p=L&&L?.example?{...e.deref(L.schema,i,!0).resolved,example:s.example||L.example}:L.schema}const y=$i(n.parentFieldFullPath,lLe(c||"")),v=pm({parser:e,schemaOrRef:p||{},pointer:t,options:r,baseRefsStack:i,absolutePointer:a.$ref||s.schema?.absolutePointer||o,deps:{...n,parentFieldFullPath:y,in:u}}),k=s.description===void 0?di(v,"description")||"":di(s,"description"),z=s.example||v.example,C=s.examples||s.content?.[g]?.examples,w=C?qJ(C,(L,q)=>Lk({parser:e,infoOrRef:L,mime:q,encoding:s.encoding})):void 0;g?m=g:s.style?b=s.style:u&&(b=RU[u]?.style??"form");const S=s.explode===void 0&&u?RU[u]?.explode??!0:!!s.explode,O=s.deprecated===void 0?v.deprecated:s.deprecated,A=r.showExtensions?Q6(s,r.showExtensions):void 0,B=v?.const||s?.const||"";return{deps:n||{},schema:v,name:c,required:d,description:k,example:z,examples:w,deprecated:O,in:u,kind:l,extensions:A,explode:S,style:b,const:B,serializationMime:m,fieldFullPath:y,[ws]:s[ws]||v[ws]}}function pm({parser:e,schemaOrRef:a,pointer:t,options:r,isChild:n=!1,isDefaultMapping:i=!1,baseRefsStack:o=[],deps:s,absolutePointer:l}){const{resolved:c,refsStack:u}=e.deref(a,o,!0),d=a.$ref||t||l||"",p=bS(u,d),m=e.mergeAllOf(c,d,p,a.$ref||l),g=m.type||dLe(m),b={operationPointer:s.operation?.pointer||l||"",schemaOrRef:a,isChild:n,isDefaultMapping:i,typePrefix:"",pointer:d,absolutePointer:l,refsStack:p,rawSchema:c,type:g,isCircular:!!m["x-circular-ref"],isComplex:!!m["x-complex"],title:m.title||gU(d)&&yr.baseName(d)||"",description:di(m,"description")||"",format:m.format,enum:m.enum||[],example:m.example,deprecated:!!m.deprecated,pattern:m.pattern,externalDocs:m.externalDocs,displayFormat:m.format,isPrimitive:cU(m,g),constraints:bU(m),default:m.default,readOnly:!!m.readOnly,writeOnly:!!m.writeOnly,const:m.const||"",contentEncoding:m.contentEncoding,contentMediaType:m.contentMediaType,minItems:m.minItems,maxItems:m.maxItems,nullable:m.nullable||m["x-nullable"],schema:m,displayType:"",items:void 0,extensions:void 0,oneOfType:"",discriminatorProp:void 0,oneOf:void 0,[ws]:m[ws],"x-enumDescriptions":di(m,"x-enumDescriptions"),get fields(){if(!b.isCircular&&!b.isComplex&&(yS(b,"object")||yS(b,"array")&&IU(m)))return ULe(e,m,d,r,p,s)}};if((m.nullable||m["x-nullable"])&&(Array.isArray(b.type)&&!b.type.some(y=>y===null||y==="null")?b.type=[...b.type,"null"]:!Array.isArray(b.type)&&(b.type!==null||b.type!=="null")&&(b.type=[b.type,"null"])),b.displayType=Array.isArray(b.type)?b.type.map(y=>y===null?"null":y).join(" or "):b.type,b.isCircular)return b;if(m.if&&m.then||m.if&&m.else){const{oneOf:y,oneOfType:v}=JLe({schema:m,parser:e,pointer:d,options:r,deps:s,refsStack:p});return b.oneOf=y,b.oneOfType=v,b}if(!n&&$U(m)!==void 0){const{oneOf:y,discriminatorProp:v}=qLe({schema:m,parser:e,deps:s,mergedSchema:m,options:r,pointer:d,refsStack:p});return b.oneOf=y,b.discriminatorProp=v,b}else n&&Array.isArray(m.oneOf)&&m.oneOf.find(y=>y.$ref===d)&&delete m.oneOf;if(m.oneOf!==void 0){const{oneOf:y,displayType:v}=NU({schemaOneOf:m.oneOf,parser:e,deps:s,options:r,pointer:d,refsStack:p,schema:m});return b.oneOfType="One of",y&&(b.oneOf=y),b.displayType=v,m.anyOf!==void 0&&console.warn(`oneOf and anyOf are not supported on the same level. Skipping anyOf at ${d}`),b}if(m.anyOf!==void 0){const{oneOf:y,displayType:v}=NU({schemaOneOf:m.anyOf,parser:e,deps:s,options:r,pointer:d,refsStack:p,schema:m});return y&&(b.oneOf=y),b.displayType=v,b.oneOfType="Any of",b}if(yS(b,"array")&&(m.items&&!IU(m)&&(b.items=pm({parser:e,schemaOrRef:Object.assign({type:"object"},m.items),pointer:d+"/items",options:r,baseRefsStack:p,deps:s,absolutePointer:yr.join(m.absolutePointer||"",["items"])})),b.displayType=m.prefixItems||Array.isArray(m.items)?"items":SLe(b.items?.displayType||b.displayType),b.displayFormat=b.items?.format||"",b.typePrefix=b.items?.typePrefix||"Array of ",b.title=b.title||b.items?.title||"",b.isPrimitive=b.items?.isPrimitive!==void 0?b.items?.isPrimitive:b.isPrimitive,b.example===void 0&&b.items?.example!==void 0&&(b.example=[b.items.example]),b.items?.isPrimitive&&(b.enum=b.items.enum,b["x-enumDescriptions"]=di(b.items,"x-enumDescriptions")),Array.isArray(b.type))){const y=b.type.filter(v=>v!=="array");y.length&&(b.displayType+=` or ${y.join(" or ")}`)}return r.showExtensions&&(b.extensions=Q6(m,r.showExtensions)),b}function qLe({schema:e,parser:a,pointer:t,options:r,refsStack:n,deps:i,mergedSchema:o}){const s=$U(e),l=s?.propertyName,c=a.findDerived([...o["x-parentRefs"]||[],t]);if(e.oneOf)for(const y of e.oneOf){if(y.$ref===void 0)continue;const v=yr.baseName(y.$ref);c[y.$ref]=v}const u=s?.mapping||{},d=s?.["x-explicitMappingOnly"]??Object.keys(u).length>0,p={};for(const y in u){const v=u[y];Array.isArray(p[v])?p[v].push(y):p[v]=[y]}const m=d?{...p}:{...c,...p};let g=[];for(const y of Object.keys(m)){const v=m[y];if(Array.isArray(v))for(const k of v)g.push({$ref:y,name:k});else g.push({$ref:y,name:v})}if(s?.defaultMapping){const y=g.findIndex(k=>k.name===yr.baseName(s.defaultMapping)),v="Default mapping";~y?g[y]={$ref:s.defaultMapping,name:v,isDefaultMapping:!0}:g.push({$ref:s.defaultMapping,name:v,isDefaultMapping:!0})}const b=Object.keys(u);return b.length!==0&&(g=g.sort((y,v)=>{if(y.isDefaultMapping&&!v.isDefaultMapping)return 1;if(!y.isDefaultMapping&&v.isDefaultMapping)return-1;const k=b.indexOf(y.name),z=b.indexOf(v.name);return k<0&&z<0?y.name.localeCompare(v.name):k<0?1:z<0?-1:k-z})),{oneOf:g.map(({$ref:y,name:v,isDefaultMapping:k},z)=>{const C=pm({parser:a,schemaOrRef:{$ref:y},pointer:y,options:r,isChild:!0,isDefaultMapping:k,baseRefsStack:n.slice(0,-1),deps:{...i,parentFieldFullPath:i.parentFieldFullPath?i.parentFieldFullPath+"&d="+z:"&d="+z.toString()},absolutePointer:o.absolutePointer});return C.title=v,C}),discriminatorProp:l}}function NU({schemaOneOf:e,parser:a,refsStack:t,pointer:r,schema:n,options:i,deps:o}){const s=e.map((c,u)=>{const{resolved:d,refsStack:p}=a.deref(c,t,!0),m=a.mergeAllOf(d,r+"/oneOf/"+u,p),g=gU(c.$ref)&&!m.title?yr.baseName(c.$ref):`${m.title||""}${m.const&&JSON.stringify(m.const)||""}`;return pm({parser:a,schemaOrRef:{...m,title:g,allOf:[{...n,oneOf:void 0,anyOf:void 0}],discriminator:d.allOf?void 0:m.discriminator},pointer:c.$ref||r+"/oneOf/"+u,options:i,baseRefsStack:p,deps:{...o,parentFieldFullPath:o.parentFieldFullPath?o.parentFieldFullPath+"&oneOf="+u:"&oneOf="+u.toString()}})}),l=[...new Set(s.map(c=>{let u=c.typePrefix+(c.title&&!i.hideSchemaTitles?`${c.title} (${c.displayType})`:c.displayType);return u.indexOf(" or ")>-1&&(u=`(${u})`),u}))].join(" or ");return{oneOf:s,displayType:l}}function JLe({schema:e,parser:a,pointer:t,options:r,refsStack:n,deps:i}){const{if:o,else:s={},then:l={},...c}=e;return{oneOf:[{allOf:[c,l,o],title:o&&o["x-displayName"]||o?.title||"case 1"},{allOf:[c,s],title:s&&s["x-displayName"]||s?.title||"case 2"}].map((u,d)=>pm({parser:a,schemaOrRef:{...u},pointer:t+"/oneOf/"+d,options:r,baseRefsStack:n,deps:{...i,parentFieldFullPath:i.parentFieldFullPath?i.parentFieldFullPath+"&oneOf="+d:"&oneOf="+d.toString()}})),oneOfType:"One of"}}function DU(e,a,t){return e||(console.warn(`Field "${a}" is invalid, skipping.
|
|
6021
|
+
`}function Yc(e,a){Uc&&window.sessionStorage.setItem("redoc."+e,a)}function X6(e){return Uc&&window.sessionStorage.getItem("redoc."+e)||""}function ALe(e,a){e=aU(e),Yc(`auth.${e}.variants`,JSON.stringify(a))}function PLe(e,a={}){return{raw:a[e+tt.APIKey],password:a[e+tt.Password],username:a[e+tt.Username],token:a[e+tt.Token]?{access_token:a[e+tt.Token]}:void 0,client_id:a[e+tt.ClientId],client_secret:a[e+tt.ClientSecret],scopes:X6(`auth.${e}.scopes`)}}function MLe(e,a){e=aU(e),typeof a=="string"?Yc("auth."+e,a):a&&(Yc(`auth.${e}.password`,a.password||""),Yc(`auth.${e}.username`,a.username||""),Yc(`auth.${e}.token`,a.token&&JSON.stringify(a.token)||""),Yc(`auth.${e}.client_id`,a.client_id||""),Yc(`auth.${e}.client_secret`,a.client_secret||""),Yc(`auth.${e}.scopes`,a.scopes&&JSON.stringify(a.scopes)||""))}function CU(e,a){try{return JSON.parse(X6(`${e}.${a}`))}catch{return null}}function TLe(e,a,t){Yc(`${e}.${a}`,JSON.stringify(t))}function BLe(e,a){return Object.fromEntries(Object.entries(e).map(([t,r])=>[t,a(r,t)]))}const jU=(e,...a)=>a.reduce((t,r)=>n=>t(r(n)),e);function Y6(e){if(!e)return"";if(!om(e))return e?.result?{result:ELe(Mr.Ast.fromJSON(JSON.stringify(e.result)))||"",raw:Y6(e.raw)}:e;const a=new RegExp("^#{1,6}?\\s+","m"),t=e.search(a);return t>-1?e.substring(0,t):e}function ELe(e){if(Array.isArray(e)){const t=e.findIndex(r=>r.type==="heading");return t===-1?e:e.slice(0,t)}if(!e.children||!Array.isArray(e.children))return;const a=e.children.findIndex(t=>t.type==="heading");return a===-1||(e.children=e.children.slice(0,a)),e}function Bk(e,a){return a?Si(e.pathname+e.hash).includes(Si(a.toLowerCase())):!1}function _Le(e,a=""){const t=Si(a.toLowerCase());return Si(e.pathname)===t||Si(e.hash)===t||Si(e.pathname+e.hash)===t}function Ek(e){return e.length>1&&e.endsWith("/")&&(e=e.slice(0,-1)),e.startsWith("/")||(e="/"+e),e}class LLe{parse(a){const t={};if(!a)return t;const r=a.startsWith("?")?a.substring(1).split("&"):a.split("&");for(const n of r){const[i,o]=n.split("=");if(i&&o){const s=Si(i),l=Si(o);if(s in t)Array.isArray(t[s])?t[s].push(l):t[s]=[t[s],l];else{const c=[",","|"].find(u=>l.includes(u));t[s]=c?l.split(c):l}}}return t}stringify(a,t={encode:!0,sort:!0}){const r=[];for(const[n,i]of Object.entries(a))if(Object.prototype.hasOwnProperty.call(a,n)){const o=t.encode?encodeURIComponent(n):n;if(Array.isArray(i)){for(const s of i)if(s){const l=t.encode?encodeURIComponent(s):s;r.push(`${o}=${l}`)}}else if(i){const s=t.encode?encodeURIComponent(i):i;r.push(`${o}=${s}`)}}return t.sort&&r.sort(),r.join("&")}}const _k=new LLe;function RLe(e){let{url:a,variables:t}=e;if(t)for(const r in t){const n=t[r];if(n.default){const i=new RegExp(`{${r}}`,"g");a=a.replace(i,n.default)}}return a}function NLe(e,a){return e.length===a.length&&e.every((t,r)=>t===a[r])}function OU(e){return e?[...e.fields||[],...e.oneOf?.flatMap(a=>a.fields||[])||[]].some(({schema:a})=>!a.isPrimitive&&!a.isCircular):!1}function DLe(e,a){Object.keys(a).length!==0&&(BU(a)?(AU(e,a),PU(e,a.security),MU(e,a.envVariables),TU(e,a.serverVariables)):ILe(e,a))}function $Le(e,a){if(!a)return;const{in:t,name:r}=e;if(BU(a)){const n=a,i={header:n.headers,query:n.query,path:n.path,cookie:n.cookie};t&&i[t]?.[r]&&(e.example=i[t][r])}else Object.entries(a).forEach(([n,i])=>{const o=i;if(!o)return;const s={header:o.headers,query:o.query,path:o.path,cookie:o.cookie};t&&s[t]?.[r]&&(e.serverValues||(e.serverValues={}),e.serverValues[n]={example:s[t][r]})})}function AU(e,a,t){if(!e.requestBody||!a?.body)return;const r=e.requestBody.content;if(!r?.mediaTypes)return;const n=(i,o)=>{i[o]&&Object.keys(i[o]).forEach(s=>{const l=i[o]?.[s]?.value;let c;if(Uo(l)?c=EU(l,a.body):c=a.body,!!c)if(t){const u=i[o][s];u.serverValues||(u.serverValues={}),u.serverValues[t]={value:c,rawValue:c},i[o][s]={...u,mime:i.name}}else i[o][s]={value:c,rawValue:c,mime:i.name}})};for(const i of r.mediaTypes)n(i,"examples"),n(i,"formExamples");return e}function PU(e,a,t){!a||!e.security.length||e.security.forEach(r=>{t?r.schemes.forEach(n=>{n.serverValues||(n.serverValues={});const i=_U(n,a);n.serverValues[t]=i}):r.schemes.forEach(n=>{const i=_U(n,a);Object.assign(n,i)})})}function ILe(e,a){e.servers.forEach(t=>{if(a[t.url]){const r=a[t.url];r&&(AU(e,r,t.url),PU(e,r.security,t.url),MU(e,r.envVariables,t.url),TU(e,r.serverVariables,t.url))}})}function MU(e,a,t){!a||Object.keys(a).length===0||(e.envVariables||(e.envVariables={}),t?(e.envVariables.serverValues||(e.envVariables.serverValues={}),e.envVariables.serverValues[t]={...e.envVariables.serverValues[t],...a}):e.envVariables.values={...e.envVariables.values,...a})}function TU(e,a,t){if(!(!a||Object.keys(a).length===0))if(t){const r=e.servers.find(n=>n.url===t);if(r){r.variables||(r.variables={});for(const[n,i]of Object.entries(a))r.variables[n]&&(r.variables[n].default=i)}}else e.servers.forEach(r=>{r.variables||(r.variables={});for(const[n,i]of Object.entries(a))r.variables[n]&&(r.variables[n].default=i)})}function BU(e){return!e||typeof e!="object"?!1:"headers"in e||"body"in e||"query"in e||"path"in e||"cookie"in e||"security"in e||"envVariables"in e||"serverVariables"in e}function EU(e,a){if(!e||typeof e!="object")return a;if(Array.isArray(e)&&Array.isArray(a)){if(e.length>0&&typeof e[0]=="object"&&e[0]!==null){const r=Object.keys(e[0]),n=a.filter(i=>typeof i!="object"||i===null?!1:r.some(o=>o in i)&&Object.keys(i).every(o=>r.includes(o)));return n.length>0?n:e}return a}const t=Array.isArray(e)?[...e]:{...e};for(const[r,n]of Object.entries(a))r in e&&(Array.isArray(e[r])||typeof n=="object"&&n!==null&&typeof e[r]=="object"?t[r]=EU(e[r],n):t[r]=n);return t}function _U(e,a){const t=a?.[e.id]||a?.default||{},r={"x-defaultAccessToken":t.token?.access_token,"x-defaultTokenType":t.token?.token_type||"Bearer","x-defaultClientId":t.client_id,"x-defaultClientSecret":t.client_secret,scopes:t.scopes||e.scopes};return e.type==="http"&&e.scheme==="basic"?(r["x-defaultUsername"]=t.username,r["x-defaultPassword"]=t.password,delete r["x-defaultAccessToken"],delete r["x-defaultTokenType"]):e.type==="oauth2"&&!t.token?.access_token&&(delete r["x-defaultAccessToken"],delete r["x-defaultTokenType"]),r}function KLe(){return window.location.origin+FG("/_otel")}const VLe={curl:"curl",JavaScript:"JavaScript",NodeJs:"Node.js",Python:"Python",Java:"Java",CSharp:"C#",PHP:"PHP",Go:"Go",Ruby:"Ruby",R:"R",Payload:"Payload"};function HLe(e){if(typeof e>"u")return!1;if(e==="")return!0;if(typeof e!="string")return e;switch(e){case"true":return!0;case"false":return!1;default:return e.split(",").map(a=>a.trim()).filter(Boolean)}}function FLe(e){if(typeof e=="string"&&!F6(e)){const a=O4(e);a||console.warn("scrollYOffset value is a selector to non-existing element. Using offset 0 by default");const t=a&&a.getBoundingClientRect().bottom||0;return()=>t}else{if(typeof e=="number"||F6(e))return()=>typeof e=="number"?e:parseFloat(e);if(typeof e=="function")return()=>{const a=e();return typeof a!="number"&&console.warn(`scrollYOffset should return number but returned value "${a}" of type ${typeof a}`),a};e!==void 0&&console.warn("Wrong value for scrollYOffset ReDoc option: should be string, number or function")}return()=>0}function GLe(e){const a=Object.values(VLe).map(t=>({lang:t}));return typeof e=="object"&&e!==null?{languages:a,...e}:{languages:a}}function e8(e,a){e={...a,...e,markdocOptions:{...e?.markdocOptions,components:{...a?.markdocOptions?.components,...e?.markdocOptions?.components},tags:{...a?.markdocOptions?.tags,...e?.markdocOptions?.tags},nodes:{...a?.markdocOptions?.nodes,...e?.markdocOptions?.nodes,heading:a?.markdocOptions?.nodes?.heading||e?.markdocOptions?.nodes.heading}}};const t=Array.isArray(e.ignoreNamedSchemas)?e.ignoreNamedSchemas:e.ignoreNamedSchemas?.split(",").map(r=>r.trim());return{downloadUrls:e.downloadUrls,schemaDefinitionsTagName:e.schemaDefinitionsTagName,corsProxyUrl:e.corsProxyUrl&&p4e(e.corsProxyUrl),hideSidebar:Xs(e.hideSidebar,!1),jsonSamplesExpandLevel:zU(e.jsonSamplesExpandLevel,2),generatedSamplesMaxDepth:wU(e.generatedSamplesMaxDepth,8),hideDownloadButtons:Xs(e.hideDownloadButtons,!1),hideInfoMetadata:Xs(e.hideInfoMetadata,!1),hideLoading:Xs(e.hideLoading,!1),hideSchemaTitles:Xs(e.hideSchemaTitles,!1),maxDisplayedEnumValues:CLe(e.maxDisplayedEnumValues),mockServer:e.mockServer?.url?{url:e.mockServer.url,position:e.mockServer.position||"first",description:e.mockServer.description||"Mock server"}:void 0,hideReplay:Xs(e.hideReplay,!1),oAuth2RedirectURI:e.oAuth2RedirectURI||null,onlyRequiredInSamples:Xs(e.onlyRequiredInSamples,!1),onDeepLinkClick:e.onDeepLinkClick||QJ(q6.ON_DEEP_LINK_CLICK),routingBasePath:ui(e.disableRouter)?"":e.routingBasePath&&Ek(e.routingBasePath)||"",schemasExpansionLevel:zU(e.schemasExpansionLevel),feedback:e.feedback||{hide:!1},sortRequiredPropsFirst:Xs(e.sortRequiredPropsFirst,!1),scrollYOffset:FLe(e.scrollYOffset),showExtensions:HLe(e.showExtensions),sanitize:Xs(e.sanitize,!1),skipBundle:Xs(e.skipBundle,!1),ignoreNamedSchemas:new Set(t),markdocOptions:e?.markdocOptions,codeSamples:GLe(e.codeSamples),layout:e.layout||Yr.THREE_PANEL,events:e.events||{},unstable_hooks:e.unstable_hooks||QJ(q6.HOOKS)||{},unstable_skipSamples:Xs(e.unstable_skipSamples,!1),unstable_externalCodeSamples:e.unstable_externalCodeSamples||[],hidePropertiesPrefix:Xs(e?.hidePropertiesPrefix,!1)}}function bS(e,a){return a&&e[e.length-1]!==a?[...e,a]:e}function a8(e,a){return a?e.concat(a):e}class LU{constructor(a,t,r=e8({})){this.options=r,this.definition=Object.assign({},a),this.validate(a),this.definition=a,this.allowMergeRefs=a.openapi.startsWith("3.1");const n=pk?window.location.href:"";om(t)&&(this.definitionUrl=new URL(t,n).href)}definitionUrl;definition;allowMergeRefs=!1;validate(a){if(ui(a.openapi))throw new Error("Document must be valid OpenAPI 3.0.0 definition")}byRef=a=>{let t;if(this.definition){a.charAt(0)!=="#"&&(a="#"+a),a=Si(a);try{t=yr.get(this.definition,a)}catch{}return t||{}}};isRef(a){return a?(a=a,a.$ref!==void 0&&a.$ref!==null):!1}deref(a,t=[],r=!1,n=0){const i=a?.["x-refsStack"];if(t=a8(t,i),n>5)return{resolved:Object.assign({},a,{"x-complex":!0}),refsStack:t};if(this.isRef(a)){const o=vU(a.$ref);if(o&&this.options.ignoreNamedSchemas.has(o))return{resolved:{type:"object",title:o},refsStack:t};let s=this.byRef(a.$ref);if(!s)throw new Error(`Failed to resolve $ref "${a.$ref}"`);return t.includes(a.$ref)?s=Object.assign({},s,{"x-circular-ref":!0}):this.isRef(s)&&(s=this.deref(s,t,r,n).resolved),this.allowMergeRefs&&(s=this.mergeRefs(a,s,r)),{resolved:s,refsStack:bS(t,a.$ref)}}return{resolved:a,refsStack:a8(t,i)}}mergeRefs(a,t,r){const{$ref:n,...i}=a,o=Object.keys(i);if(o.length===0)return{...t,$ref:n};if(r&&o.some(s=>!["description","title","externalDocs","x-refsStack","x-parentRefs","readOnly","writeOnly","x-complex"].includes(s))){const{description:s,title:l,readOnly:c,writeOnly:u,...d}=i;return{allOf:[{description:s,title:l,readOnly:c,writeOnly:u},t,d]}}else return{...t,...i}}mergeAllOf(a,t,r,n="",i=0){if(a["x-circular-ref"])return a;if(a=this.hoistOneOfs(a),a.allOf===void 0)return{absolutePointer:n,...a};let o={...a,"x-parentRefs":[],absolutePointer:yr.join(n,["allOf"]),allOf:void 0,title:i===0?a.title||vU(t):a.title};!ui(o.properties)&&Uo(o.properties)&&(o.properties={...o.properties}),!ui(o.items)&&Uo(o.items)&&(o.items={...o.items});const s=a.allOf.map((l,c)=>{const{resolved:u,refsStack:d}=this.deref(l,r,!0,i),p=l.$ref,m=p||yr.join(n,[String(c)]);if(u["x-complex"])return{$ref:p,refsStack:bS(d,p),schema:{"x-complex":!0},absolutePointer:m};const g=this.mergeAllOf(u,p,d,m,i+1);if(!(g["x-circular-ref"]&&g.allOf))return p&&o["x-parentRefs"]?.push(...g["x-parentRefs"]||[],p),{$ref:p,refsStack:bS(d,p),schema:g,absolutePointer:m}}).filter(Boolean);for(const[l,{schema:c,refsStack:u,absolutePointer:d}]of s.entries()){const{type:p,enum:m,properties:g,items:b,required:y,title:v,description:k,readOnly:z,writeOnly:C,oneOf:w,anyOf:S,"x-circular-ref":O,"x-complex":A,...B}=c||{};if(!(o.type!==p&&!ui(o.type)&&!ui(p)&&!i)){if(ui(p)||(Array.isArray(p)&&Array.isArray(o.type)?o.type=[...p,...o.type]:o.type=p),ui(m)||(Array.isArray(m)&&Array.isArray(o.enum)?o.enum=Array.from(new Set([...m,...o.enum])):o.enum=m),!ui(g)&&Uo(g)){o.properties=o.properties||{};for(const L in g){const q=a8(u,g[L]?.["x-refsStack"]);if(!o.properties[L])o.properties[L]={...g[L],absolutePointer:yr.join(d,["properties",L]),"x-refsStack":q};else if(!O){const N=this.mergeAllOf({allOf:[o.properties[L],g[L]],"x-refsStack":q},t+"/properties/"+L,q,yr.join(d,["allOf",String(l),"properties",L]),i+1);o.properties[L]=N}}}if(!ui(b)&&!O&&!A){const L=typeof o.items=="boolean"?{}:Object.assign({},o.items),q=typeof c.items=="boolean"?{}:Object.assign({},c.items);o.items=this.mergeAllOf({allOf:[L,q]},t+"/items",u,"",i+1)}ui(w)||(o.oneOf=w),ui(S)||(o.anyOf=S),Array.isArray(y)&&(o.required=[...o.required||[],...y]),o={...o,title:o.title||v,description:o.description||k,readOnly:ui(o.readOnly)?z:o.readOnly,writeOnly:ui(o.writeOnly)?C:o.writeOnly,"x-circular-ref":o["x-circular-ref"]||O,"x-complex":o["x-complex"]||A,...B}}}return o}findDerived(a){const t={},r=this.definition.components&&this.definition.components.schemas||{};for(const n in r){const{resolved:i}=this.deref(r[n]);!ui(i.allOf)&&i.allOf.find(o=>!ui(o.$ref)&&a.indexOf(o.$ref)>-1)&&(t["#/components/schemas/"+n]=[i["x-discriminator-value"]||n])}return t}hoistOneOfs(a){if(ui(a.allOf))return a;const{allOf:t,...r}=a;for(let n=0;n<t.length;n++){const{oneOf:i,...o}=t[n];if(i&&Array.isArray(i)){const s=t.slice(0,n),l=t.slice(n+1),c=Object.keys(o).length>0?[o]:[];return{...r,oneOf:i.map(u=>({allOf:[...s,...c,u,...l]}))}}}return a}}function Lk({parser:e,infoOrRef:a,mime:t,encoding:r}){const{resolved:n}=e.deref(a),i=n.value,o=n.value,s=di(n,"summary"),l=di(n,"description");return{value:o,rawValue:i,summary:s,description:l,mime:t,encoding:r}}const RU={path:{style:"simple",explode:!1},query:{style:"form",explode:!0},header:{style:"simple",explode:!1},cookie:{style:"form",explode:!0}};function Rp(e,a,t,r,n,i,o=t){const{resolved:s}=e.deref(a),l=a.kind||"field",c=a.name||s.name,u=s.in,d=!!s.required;let p=s.schema,m,g="",b;if(!p&&s.in&&s.content){g=Object.keys(s.content)[0];const L=s.content[g];p=L&&L?.example?{...e.deref(L.schema,i,!0).resolved,example:s.example||L.example}:L.schema}const y=$i(n.parentFieldFullPath,lLe(c||"")),v=pm({parser:e,schemaOrRef:p||{},pointer:t,options:r,baseRefsStack:i,absolutePointer:a.$ref||s.schema?.absolutePointer||o,deps:{...n,parentFieldFullPath:y,in:u}}),k=s.description===void 0?di(v,"description")||"":di(s,"description"),z=s.example||v.example,C=s.examples||s.content?.[g]?.examples,w=C?qJ(C,(L,q)=>Lk({parser:e,infoOrRef:L,mime:q,encoding:s.encoding})):void 0;g?m=g:s.style?b=s.style:u&&(b=RU[u]?.style??"form");const S=s.explode===void 0&&u?RU[u]?.explode??!0:!!s.explode,O=s.deprecated===void 0?v.deprecated:s.deprecated,A=r.showExtensions?Q6(s,r.showExtensions):void 0,B=v?.const||s?.const||"";return{deps:n||{},schema:v,name:c,required:d,description:k,example:z,examples:w,deprecated:O,in:u,kind:l,extensions:A,explode:S,style:b,const:B,serializationMime:m,fieldFullPath:y,[ws]:s[ws]||v[ws]}}function pm({parser:e,schemaOrRef:a,pointer:t,options:r,isChild:n=!1,isDefaultMapping:i=!1,baseRefsStack:o=[],deps:s,absolutePointer:l}){const{resolved:c,refsStack:u}=e.deref(a,o,!0),d=a.$ref||t||l||"",p=bS(u,d),m=e.mergeAllOf(c,d,p,a.$ref||l),g=m.type||dLe(m),b={operationPointer:s.operation?.pointer||l||"",schemaOrRef:a,isChild:n,isDefaultMapping:i,typePrefix:"",pointer:d,absolutePointer:l,refsStack:p,rawSchema:c,type:g,isCircular:!!m["x-circular-ref"],isComplex:!!m["x-complex"],title:m.title||gU(d)&&yr.baseName(d)||"",description:di(m,"description")||"",format:m.format,enum:m.enum||[],example:m.example,deprecated:!!m.deprecated,pattern:m.pattern,externalDocs:m.externalDocs,displayFormat:m.format,isPrimitive:cU(m,g),constraints:bU(m),default:m.default,readOnly:!!m.readOnly,writeOnly:!!m.writeOnly,const:m.const||"",contentEncoding:m.contentEncoding,contentMediaType:m.contentMediaType,minItems:m.minItems,maxItems:m.maxItems,nullable:m.nullable||m["x-nullable"],schema:m,displayType:"",items:void 0,extensions:void 0,oneOfType:"",discriminatorProp:void 0,oneOf:void 0,[ws]:m[ws],"x-enumDescriptions":di(m,"x-enumDescriptions"),get fields(){if(!b.isCircular&&!b.isComplex&&(yS(b,"object")||yS(b,"array")&&IU(m)))return ULe(e,m,d,r,p,s)}};if((m.nullable||m["x-nullable"])&&(Array.isArray(b.type)&&!b.type.some(y=>y===null||y==="null")?b.type=[...b.type,"null"]:!Array.isArray(b.type)&&(b.type!==null||b.type!=="null")&&(b.type=[b.type,"null"])),b.displayType=Array.isArray(b.type)?b.type.map(y=>y===null?"null":y).join(" or "):b.type,b.isCircular)return b;if(m.if&&m.then||m.if&&m.else){const{oneOf:y,oneOfType:v}=JLe({schema:m,parser:e,pointer:d,options:r,deps:s,refsStack:p});return b.oneOf=y,b.oneOfType=v,b}if(!n&&$U(m)!==void 0){const{oneOf:y,discriminatorProp:v}=qLe({schema:m,parser:e,deps:s,mergedSchema:m,options:r,pointer:d,refsStack:p});return b.oneOf=y,b.discriminatorProp=v,b}else n&&Array.isArray(m.oneOf)&&m.oneOf.find(y=>y.$ref===d)&&delete m.oneOf;if(m.oneOf!==void 0){const{oneOf:y,displayType:v}=NU({schemaOneOf:m.oneOf,parser:e,deps:s,options:r,pointer:d,refsStack:p,schema:m});return b.oneOfType="One of",y&&(b.oneOf=y),b.displayType=v,m.anyOf!==void 0&&console.warn(`oneOf and anyOf are not supported on the same level. Skipping anyOf at ${d}`),b}if(m.anyOf!==void 0){const{oneOf:y,displayType:v}=NU({schemaOneOf:m.anyOf,parser:e,deps:s,options:r,pointer:d,refsStack:p,schema:m});return y&&(b.oneOf=y),b.displayType=v,b.oneOfType="Any of",b}if(yS(b,"array")&&(m.items&&!IU(m)&&(b.items=pm({parser:e,schemaOrRef:Object.assign({type:"object"},m.items),pointer:d+"/items",options:r,baseRefsStack:p,deps:s,absolutePointer:yr.join(m.absolutePointer||"",["items"])})),b.displayType=m.prefixItems||Array.isArray(m.items)?"items":SLe(b.items?.displayType||b.displayType),b.displayFormat=b.items?.format||"",b.typePrefix=b.items?.typePrefix||"Array of ",b.title=b.title||b.items?.title||"",b.isPrimitive=b.items?.isPrimitive!==void 0?b.items?.isPrimitive:b.isPrimitive,b.example===void 0&&b.items?.example!==void 0&&(b.example=[b.items.example]),b.items?.isPrimitive&&(b.enum=b.items.enum,b["x-enumDescriptions"]=di(b.items,"x-enumDescriptions")),Array.isArray(b.type))){const y=b.type.filter(v=>v!=="array");y.length&&(b.displayType+=` or ${y.join(" or ")}`)}return r.showExtensions&&(b.extensions=Q6(m,r.showExtensions)),b}function qLe({schema:e,parser:a,pointer:t,options:r,refsStack:n,deps:i,mergedSchema:o}){const s=$U(e),l=s?.propertyName,c=a.findDerived([...o["x-parentRefs"]||[],t]);if(e.oneOf)for(const y of e.oneOf){if(y.$ref===void 0)continue;const v=yr.baseName(y.$ref);c[y.$ref]=v}const u=s?.mapping||{},d=s?.["x-explicitMappingOnly"]??Object.keys(u).length>0,p={};for(const y in u){const v=u[y];Array.isArray(p[v])?p[v].push(y):p[v]=[y]}const m=d?{...p}:{...c,...p};let g=[];for(const y of Object.keys(m)){const v=m[y];if(Array.isArray(v))for(const k of v)g.push({$ref:y,name:k});else g.push({$ref:y,name:v})}if(s?.defaultMapping){const y=g.findIndex(k=>k.name===yr.baseName(s.defaultMapping)),v="Default mapping";~y?g[y]={$ref:s.defaultMapping,name:v,isDefaultMapping:!0}:g.push({$ref:s.defaultMapping,name:v,isDefaultMapping:!0})}const b=Object.keys(u);return b.length!==0&&(g=g.sort((y,v)=>{if(y.isDefaultMapping&&!v.isDefaultMapping)return 1;if(!y.isDefaultMapping&&v.isDefaultMapping)return-1;const k=b.indexOf(y.name),z=b.indexOf(v.name);return k<0&&z<0?y.name.localeCompare(v.name):k<0?1:z<0?-1:k-z})),{oneOf:g.map(({$ref:y,name:v,isDefaultMapping:k},z)=>{const C=pm({parser:a,schemaOrRef:{$ref:y},pointer:y,options:r,isChild:!0,isDefaultMapping:k,baseRefsStack:n.slice(0,-1),deps:{...i,parentFieldFullPath:i.parentFieldFullPath?i.parentFieldFullPath+"&d="+z:"&d="+z.toString()},absolutePointer:o.absolutePointer});return C.title=v,C}),discriminatorProp:l}}function NU({schemaOneOf:e,parser:a,refsStack:t,pointer:r,schema:n,options:i,deps:o}){const s=e.map((c,u)=>{const{resolved:d,refsStack:p}=a.deref(c,t,!0),m=a.mergeAllOf(d,r+"/oneOf/"+u,p),g=gU(c.$ref)&&!m.title?yr.baseName(c.$ref):`${m.title||""}${m.const&&JSON.stringify(m.const)||""}`;return pm({parser:a,schemaOrRef:{...m,title:g,allOf:[{...n,oneOf:void 0,anyOf:void 0}],discriminator:d.allOf?void 0:m.discriminator},pointer:c.$ref||r+"/oneOf/"+u,options:i,baseRefsStack:p,deps:{...o,parentFieldFullPath:o.parentFieldFullPath?o.parentFieldFullPath+"&oneOf="+u:"&oneOf="+u.toString()}})}),l=[...new Set(s.map(c=>{let u=c.typePrefix+(c.title&&!i.hideSchemaTitles?`${c.title} (${c.displayType})`:c.displayType);return u.indexOf(" or ")>-1&&(u=`(${u})`),u}))].join(" or ");return{oneOf:s,displayType:l}}function JLe({schema:e,parser:a,pointer:t,options:r,refsStack:n,deps:i}){const{if:o,else:s={},then:l={},...c}=e;return{oneOf:[{allOf:[c,l,o],title:o&&o["x-displayName"]||o?.title||"case 1"},{allOf:[c,s],title:s&&s["x-displayName"]||s?.title||"case 2"}].map((u,d)=>pm({parser:a,schemaOrRef:{...u},pointer:t+"/oneOf/"+d,options:r,baseRefsStack:n,deps:{...i,parentFieldFullPath:i.parentFieldFullPath?i.parentFieldFullPath+"&oneOf="+d:"&oneOf="+d.toString()}})),oneOfType:"One of"}}function DU(e,a,t){return e||(console.warn(`Field "${a}" is invalid, skipping.
|
|
6022
6022
|
Field must be an object but got ${typeof e} at "${t}"`),{})}function ULe(e,a,t,r,n,i){let o=a.properties||(yS(a,"array")?a.prefixItems||a.items:void 0)||{};const s=a.patternProperties||{},l=a.additionalProperties||a.unevaluatedProperties,c=a.prefixItems?a.items:a.additionalItems,u=a.default||{};let d=Object.keys(o).map(p=>{const m=DU(o[p],p,t),g=a.required===void 0?!1:a.required.indexOf(p)>-1;return Rp(e,{name:a.properties?p:`[${p}]`,required:g,schema:{...m,example:a.example?.[p]||m.example,default:m.default===void 0&&u?u[p]:m.default}},t+"/properties/"+p,r,i,n,yr.join(a.absolutePointer||"",["properties",p]))});return r.sortRequiredPropsFirst&&(d=yU(d,a.required)),d.push(...Object.keys(s).map(p=>{const m=DU(s[p],p,t);return Rp(e,{name:p,required:!1,schema:m,kind:"patternProperties"},`${t}/patternProperties/${p}`,r,i,n)})),(Uo(l)||l===!0)&&d.push(Rp(e,{name:(Uo(l)&&l["x-additionalPropertiesName"]||"property name").concat("*"),required:!1,schema:l===!0?{}:l,kind:"additionalProperties"},t+"/additionalProperties",r,i,n,yr.join(a.absolutePointer||"",["additionalProperties"]))),d.push(...WLe({parser:e,schema:c,fieldsCount:d.length,$ref:t,options:r,refsStack:n,deps:i})),kU(d)}function WLe({parser:e,schema:a=!1,fieldsCount:t,$ref:r,options:n,refsStack:i,deps:o}){return typeof a=="boolean"?a?[Rp(e,{name:`[${t}...]`,schema:{},kind:"additionalItems"},`${r}/additionalItems`,n,o,i)]:[]:Array.isArray(a)?[...a.map((s,l)=>Rp(e,{name:`[${t+l}]`,schema:s,kind:"additionalItems"},`${r}/additionalItems/${l}`,n,o,i))]:Uo(a)?[Rp(e,{name:`[${t}...]`,schema:a,kind:"additionalItems"},`${r}/additionalItems`,n,o,i)]:[]}function $U(e){return e.discriminator||e["x-discriminator"]}function yS(e,a){return e.type===a||Array.isArray(e.type)&&e.type.includes(a)}function IU(e){return!!(Array.isArray(e.items)||Array.isArray(e.prefixItems))}const t8=Symbol("skip");function Rk(e){return e<10?"0"+e:e}function ZLe(e,a,t,r){var n=t?"":e.getUTCFullYear()+"-"+Rk(e.getUTCMonth()+1)+"-"+Rk(e.getUTCDate());return a||(n+="T"+Rk(e.getUTCHours())+":"+Rk(e.getUTCMinutes())+":"+Rk(e.getUTCSeconds())+"Z"),n}function KU(e,a){return a>e.length?e.repeat(Math.trunc(a/e.length)+1).substring(0,a):e}function kS(...e){const a=t=>t&&typeof t=="object";return e.reduce((t,r)=>(Object.keys(r||{}).forEach(n=>{const i=t[n],o=r[n];a(i)&&a(o)?t[n]=kS(i,o):t[n]=o}),t),Array.isArray(e[e.length-1])?[]:{})}function QLe(e){var a=YLe(e),t=eRe(a,a,a,a),r="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,n=>{var i=t()*16%16|0;return(n=="x"?i:i&3|8).toString(16)});return r}function r8(e){return{value:e==="object"?{}:e==="array"?[]:void 0}}function Np(e,a){a&&e.pop()}function XLe(e){return{name:e?.xml?.name||"",prefix:e?.xml?.prefix||"",namespace:e?.xml?.namespace||null,attribute:e?.xml?.attribute??!1,wrapped:e?.xml?.wrapped??!1}}function xS(e,a={},t={}){const{value:r}=e,{propertyName:n}=t,{name:i,prefix:o,namespace:s,attribute:l,wrapped:c}=XLe(a);let u=i||n?`${o?o+":":""}${i||n}`:null,d=typeof r=="object"?Array.isArray(r)?[...r]:{...r}:r;return l&&u&&(u=`$${u}`),s&&(typeof d=="object"?d[`$xmlns${o?":"+o:""}`]=s:d={[`$xmlns${o?":"+o:""}`]:s,"#text":d}),a.type==="array"&&(c&&Array.isArray(d)&&(d={[u]:[...d]}),c||(u=null),a.example!==void 0&&!c&&(u=a.items?.xml?.name||u)),(a.oneOf||a.anyOf||a.allOf||a.$ref)&&(u=null),{propertyName:u,value:d}}function YLe(e){var a=0;if(e.length==0)return a;for(var t=0;t<e.length;t++){var r=e.charCodeAt(t);a=(a<<5)-a+r,a=a&a}return a}function eRe(e,a,t,r){return function(){e|=0,a|=0,t|=0,r|=0;var n=e-(a<<27|a>>>5)|0;return e=a^(t<<17|t>>>15),a=t+r|0,t=r+n|0,r=e+n|0,(r>>>0)/4294967296}}function aRe(e,a,t,r,n){let i=uc(e,t,r);const o=[];for(let s of a){const{type:l,readOnly:c,writeOnly:u,value:d}=uc({type:i.type,...s},t,r,{...n,isAllOfChild:!0});i.type&&l&&l!==i.type&&(console.warn("allOf: schemas with different types can't be merged"),i.type=l),i.type=i.type||l,i.readOnly=i.readOnly||c,i.writeOnly=i.writeOnly||u,d!=null&&o.push(d)}if(i.type==="object"){i.value=kS(i.value||{},...o.filter(s=>typeof s=="object"));for(const s in i.value)i.value[s]===t8&&delete i.value[s];return i}else{i.type==="array"&&(t.quiet||console.warn('OpenAPI Sampler: found allOf with "array" type. Result may be incorrect'));const s=o[o.length-1];return i.value=s??i.value,i}}const VU={multipleOf:"number",maximum:"number",exclusiveMaximum:"number",minimum:"number",exclusiveMinimum:"number",maxLength:"string",minLength:"string",pattern:"string",items:"array",maxItems:"array",minItems:"array",uniqueItems:"array",additionalItems:"array",maxProperties:"object",minProperties:"object",required:"object",additionalProperties:"object",properties:"object",patternProperties:"object",dependencies:"object"};function wS(e){if(e.type!==void 0)return Array.isArray(e.type)?e.type.length===0?null:e.type[0]:e.type;const a=Object.keys(VU);for(var t=0;t<a.length;t++){let r=a[t],n=VU[r];if(e[r]!==void 0)return n}return null}let zS={},cc=[];function tRe(){zS={},cc=[]}function HU(e){let a;return e.const!==void 0?a=e.const:e.examples!==void 0&&e.examples.length?a=e.examples[0]:e.enum!==void 0&&e.enum.length?a=e.enum[0]:e.default!==void 0&&(a=e.default),a}function FU(e){const a=HU(e);if(a!==void 0)return{value:a,readOnly:e.readOnly,writeOnly:e.writeOnly,type:null}}function uc(e,a,t,r){if(r){if(cc.includes(e))return r8(wS(e));cc.push(e)}if(r&&r.depth>a.maxSampleDepth)return Np(cc,r),r8(wS(e));if(e.$ref){if(!t)throw new Error("Your schema contains $ref. You must provide full specification in the third parameter.");let s=decodeURIComponent(e.$ref);s.startsWith("#")&&(s=s.substring(1));const l=Di.get(t,s);let c;if(zS[s]!==!0){zS[s]=!0;const u=uc(l,a,t,r);if(a.format==="xml"){const{propertyName:d,value:p}=xS(u,l,r);c={...u,value:{[d||"root"]:p}}}else c=u;zS[s]=!1}else{const u=wS(l);c=r8(u)}return Np(cc,r),c}if(e.example!==void 0)return Np(cc,r),{value:e.example,readOnly:e.readOnly,writeOnly:e.writeOnly,type:e.type};if(e.allOf!==void 0)return Np(cc,r),FU(e)||aRe({...e,allOf:void 0},e.allOf,a,t,r);if(e.oneOf&&e.oneOf.length){e.anyOf&&(a.quiet||console.warn("oneOf and anyOf are not supported on the same level. Skipping anyOf")),Np(cc,r);const s=Object.assign({readOnly:e.readOnly,writeOnly:e.writeOnly},e.oneOf[0]);return o(e,s)}if(e.anyOf&&e.anyOf.length){Np(cc,r);const s=Object.assign({readOnly:e.readOnly,writeOnly:e.writeOnly},e.anyOf[0]);return o(e,s)}if(e.if&&e.then){Np(cc,r);const{if:s,then:l,...c}=e;return uc(kS(c,s,l),a,t,r)}let n=HU(e),i=null;if(n===void 0){n=null,i=e.type,Array.isArray(i)&&e.type.length>0&&(i=e.type[0]),i||(i=wS(e));let s=dW[i];s&&(n=s(e,a,t,r))}return Np(cc,r),{value:n,readOnly:e.readOnly,writeOnly:e.writeOnly,type:i};function o(s,l){const c=FU(s);if(c!==void 0)return c;const u=uc({...s,oneOf:void 0,anyOf:void 0},a,t,r),d=uc(l,a,t,r);if(typeof u.value=="object"&&typeof d.value=="object"){const p=kS(u.value,d.value);return{...d,value:p}}return d}}function rRe(e,a={},t,r){const n=r&&r.depth||1;let i=Math.min(e.maxItems!=null?e.maxItems:1/0,e.minItems||1);const o=e.prefixItems||e.items||e.contains;Array.isArray(o)&&(i=Math.max(i,o.length));let s=c=>Array.isArray(o)?o[c]||{}:o||{},l=[];if(!o)return l;for(let c=0;c<i;c++){let u=s(c),{value:d}=uc(u,a,t,{depth:n+1});if(a?.format==="xml"){const{value:p,propertyName:m}=xS({value:d},u,r);m?(l?.[m]||(l={...l,[m]:[]}),l[m].push(p)):l={...l,...p}}else l.push(d)}if(a?.format==="xml"&&n===1){const{value:c,propertyName:u}=xS({value:null},e,r);u&&(c?l=Array.isArray(l)?{[u]:{...c,...l.map(d=>({"#text":{...d}}))}}:{[u]:{...l,...c}}:l={[u]:l})}return l}function nRe(e){return!0}function GU(e){let a=0;if(e.type==="number"&&(e.format==="float"||e.format==="double")&&(a=.1),typeof e.exclusiveMinimum=="boolean"||typeof e.exclusiveMaximum=="boolean"){if(e.maximum&&e.minimum)return a=e.exclusiveMinimum?Math.floor(e.minimum)+1:e.minimum,(e.exclusiveMaximum&&a>=e.maximum||!e.exclusiveMaximum&&a>e.maximum)&&(a=(e.maximum+e.minimum)/2),a;if(e.minimum)return e.exclusiveMinimum?Math.floor(e.minimum)+1:e.minimum;if(e.maximum)return e.exclusiveMaximum?e.maximum>0?0:Math.floor(e.maximum)-1:e.maximum>0?0:e.maximum}else{if(e.minimum)return e.minimum;e.exclusiveMinimum?(a=Math.floor(e.exclusiveMinimum)+1,a===e.exclusiveMaximum&&(a=(a+Math.floor(e.exclusiveMaximum)-1)/2)):e.exclusiveMaximum?a=Math.floor(e.exclusiveMaximum)-1:e.maximum&&(a=e.maximum)}return a}function iRe(e,a={},t,r){let n={};const i=r&&r.depth||1;if(e&&typeof e.properties=="object"){const o=Array.isArray(e.required)?e.required:[],s={};for(const l of o)s[l]=!0;Object.keys(e.properties).forEach(l=>{if(a.skipNonRequired&&!s.hasOwnProperty(l))return;const c=uc(e.properties[l],a,t,{propertyName:l,depth:i+1});if(a.skipReadOnly&&c.readOnly){r?.isAllOfChild&&(n[l]=t8);return}if(a.skipWriteOnly&&c.writeOnly){r?.isAllOfChild&&(n[l]=t8);return}if(a?.format==="xml"){const{propertyName:u,value:d}=xS(c,e.properties[l],{propertyName:l});u?n[u]=d:n={...n,...d}}else n[l]=c.value})}if(e&&typeof e.additionalProperties=="object"){const o=e.additionalProperties["x-additionalPropertiesName"]||"property";n[`${String(o)}1`]=uc(e.additionalProperties,a,t,{depth:i+1}).value,n[`${String(o)}2`]=uc(e.additionalProperties,a,t,{depth:i+1}).value}if(e&&typeof e.properties=="object"&&e.maxProperties!==void 0&&Object.keys(n).length>e.maxProperties){const o={};let s=0;(Array.isArray(e.required)?e.required:[]).forEach(l=>{n[l]!==void 0&&(o[l]=n[l],s++)}),Object.keys(n).forEach(l=>{s<e.maxProperties&&!o.hasOwnProperty(l)&&(o[l]=n[l],s++)}),n=o}return n}function Nk(e,a){return e}function qU(e,a,t){let r=1;if(e)switch(e){case"?":{r=0;break}case"*":{r=Nk(0);break}case"+":{r=Nk(1);break}default:throw new Error("Unknown quantifier symbol provided.")}else a!=null&&t!=null?r=Nk(parseInt(a)):a!=null&&t==null&&(r=parseInt(a));return r}function oRe(e){let a=!1;e instanceof RegExp&&(a=e.flags.includes("i"),e=e.toString(),e=e.match(/\/(.+?)\//)?.[1]??""),e=e.replace(/^(\^)?(.*?)(\$)?$/,"$2");let t,r,n;const i=/([.A-Za-z0-9])(?:\{(\d+)(?:\,(\d+)|)\}|(\?|\*|\+))(?![^[]*]|[^{]*})/;let o=e.match(i);for(;o!=null;){const d=o[2],p=o[3],m=o[4];n=qU(m,d,p),e=e.slice(0,o.index)+o[1].repeat(n)+e.slice(o.index+o[0].length),o=e.match(i)}const s=/(\d-\d|\w-\w|\d|\w|[-!@#$&()`.+,/"])/,l=/\[(\^|)(-|)(.+?)\](?:\{(\d+)(?:\,(\d+)|)\}|(\?|\*|\+)|)/;for(o=e.match(l);o!=null;){const d=o[1]==="^",p=o[2]==="-",m=o[4],g=o[5],b=o[6],y=[];let v=o[3],k=v.match(s);for(p&&y.push(45);k!=null;){if(k[0].indexOf("-")===-1)a&&isNaN(Number(k[0]))?(y.push(k[0].toUpperCase().charCodeAt(0)),y.push(k[0].toLowerCase().charCodeAt(0))):y.push(k[0].charCodeAt(0));else{const C=k[0].split("-").map(w=>w.charCodeAt(0));if(t=C[0],r=C[1],t>r)throw new Error("Character range provided is out of order.");for(let w=t;w<=r;w++)if(a&&isNaN(Number(String.fromCharCode(w)))){const S=String.fromCharCode(w);y.push(S.toUpperCase().charCodeAt(0)),y.push(S.toLowerCase().charCodeAt(0))}else y.push(w)}v=v.substring(k[0].length),k=v.match(s)}if(n=qU(b,m,g),d){let C=-1;for(let w=48;w<=57;w++){if(C=y.indexOf(w),C>-1){y.splice(C,1);continue}y.push(w)}for(let w=65;w<=90;w++){if(C=y.indexOf(w),C>-1){y.splice(C,1);continue}y.push(w)}for(let w=97;w<=122;w++){if(C=y.indexOf(w),C>-1){y.splice(C,1);continue}y.push(w)}}const z=Array.from({length:n},()=>String.fromCharCode(y[Nk(0)])).join("");e=e.slice(0,o.index)+z+e.slice(o.index+o[0].length),o=e.match(l)}const c=/(.)\{(\d+)\,(\d+)\}/;for(o=e.match(c);o!=null;){if(t=parseInt(o[2]),r=parseInt(o[3]),t>r)throw new Error("Numbers out of order in {} quantifier.");n=Nk(t),e=e.slice(0,o.index)+o[1].repeat(n)+e.slice(o.index+o[0].length),o=e.match(c)}const u=/(.)\{(\d+)\}/;for(o=e.match(u);o!=null;)n=parseInt(o[2]),e=e.slice(0,o.index)+o[1].repeat(n)+e.slice(o.index+o[0].length),o=e.match(u);return e}const sRe="qwerty!@#$%^123456";function lRe(){return"user@example.com"}function cRe(){return"\u043F\u043E\u0448\u0442\u0430@\u0443\u043A\u0440.\u043D\u0435\u0442"}function uRe(e,a){let t="pa$$word";return e>t.length&&(t+="_",t+=KU(sRe,e-t.length).substring(0,e-t.length)),t}function n8({min:e,max:a,omitTime:t,omitDate:r}){let n=ZLe(new Date("2019-08-24T14:15:22.123Z"),t,r);return n.length<e&&console.warn(`Using minLength = ${e} is incorrect with format "date-time"`),a&&n.length>a&&console.warn(`Using maxLength = ${a} is incorrect with format "date-time"`),n}function dRe(e,a){return n8({min:e,max:a,omitTime:!1,omitDate:!1})}function pRe(e,a){return n8({min:e,max:a,omitTime:!0,omitDate:!1})}function hRe(e,a){return n8({min:e,max:a,omitTime:!1,omitDate:!0}).slice(1)}function JU(e,a,t,r,n=!1){if(r&&n)return oRe(r);let i=KU("string",e);return a&&i.length>a&&(i=i.substring(0,a)),i}function mRe(){return"192.168.0.1"}function fRe(){return"2001:0db8:85a3:0000:0000:8a2e:0370:7334"}function gRe(){return"example.com"}function vRe(){return"\u043F\u0440\u0438\u043A\u043B\u0430\u0434.\u0443\u043A\u0440"}function bRe(){return"http://example.com"}function yRe(){return"../dictionary"}function kRe(){return"http://example.com/{endpoint}"}function xRe(){return"http://example.com/entity/1"}function wRe(){return"/entity/1"}function zRe(e,a,t){return QLe(t||"id")}function SRe(){return"/json/pointer"}function CRe(){return"1/relative/json/pointer"}function jRe(){return"/regex/"}const ORe={email:lRe,"idn-email":cRe,password:uRe,"date-time":dRe,date:pRe,time:hRe,ipv4:mRe,ipv6:fRe,hostname:gRe,"idn-hostname":vRe,iri:xRe,"iri-reference":wRe,uri:bRe,"uri-reference":yRe,"uri-template":kRe,uuid:zRe,default:JU,"json-pointer":SRe,"relative-json-pointer":CRe,regex:jRe};function ARe(e,a,t,r){let n=e.format||"default",i=ORe[n]||JU,o=r&&r.propertyName;return i(e.minLength||0,e.maxLength,o,e.pattern,a?.enablePatterns)}var i8={},UU={},WU;function o8(){return WU||(WU=1,(function(e){const a=":A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",t=a+"\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040",r="["+a+"]["+t+"]*",n=new RegExp("^"+r+"$"),i=function(s,l){const c=[];let u=l.exec(s);for(;u;){const d=[];d.startIndex=l.lastIndex-u[0].length;const p=u.length;for(let m=0;m<p;m++)d.push(u[m]);c.push(d),u=l.exec(s)}return c},o=function(s){const l=n.exec(s);return!(l===null||typeof l>"u")};e.isExist=function(s){return typeof s<"u"},e.isEmptyObject=function(s){return Object.keys(s).length===0},e.merge=function(s,l,c){if(l){const u=Object.keys(l),d=u.length;for(let p=0;p<d;p++)c==="strict"?s[u[p]]=[l[u[p]]]:s[u[p]]=l[u[p]]}},e.getValue=function(s){return e.isExist(s)?s:""},e.isName=o,e.getAllMatches=i,e.nameRegexp=r})(UU)),UU}var ZU;function QU(){if(ZU)return i8;ZU=1;const e=o8(),a={allowBooleanAttributes:!1,unpairedTags:[]};i8.validate=function(v,k){k=Object.assign({},a,k);const z=[];let C=!1,w=!1;v[0]==="\uFEFF"&&(v=v.substr(1));for(let S=0;S<v.length;S++)if(v[S]==="<"&&v[S+1]==="?"){if(S+=2,S=r(v,S),S.err)return S}else if(v[S]==="<"){let O=S;if(S++,v[S]==="!"){S=n(v,S);continue}else{let A=!1;v[S]==="/"&&(A=!0,S++);let B="";for(;S<v.length&&v[S]!==">"&&v[S]!==" "&&v[S]!==" "&&v[S]!==`
|
|
6023
6023
|
`&&v[S]!=="\r";S++)B+=v[S];if(B=B.trim(),B[B.length-1]==="/"&&(B=B.substring(0,B.length-1),S--),!g(B)){let N;return B.trim().length===0?N="Invalid space after '<'.":N="Tag '"+B+"' is an invalid name.",p("InvalidTag",N,b(v,S))}const L=s(v,S);if(L===!1)return p("InvalidAttr","Attributes for '"+B+"' have open quote.",b(v,S));let q=L.value;if(S=L.index,q[q.length-1]==="/"){const N=S-q.length;q=q.substring(0,q.length-1);const U=c(q,k);if(U===!0)C=!0;else return p(U.err.code,U.err.msg,b(v,N+U.err.line))}else if(A)if(L.tagClosed){if(q.trim().length>0)return p("InvalidTag","Closing tag '"+B+"' can't have attributes or invalid starting.",b(v,O));if(z.length===0)return p("InvalidTag","Closing tag '"+B+"' has not been opened.",b(v,O));{const N=z.pop();if(B!==N.tagName){let U=b(v,N.tagStartPos);return p("InvalidTag","Expected closing tag '"+N.tagName+"' (opened in line "+U.line+", col "+U.col+") instead of closing tag '"+B+"'.",b(v,O))}z.length==0&&(w=!0)}}else return p("InvalidTag","Closing tag '"+B+"' doesn't have proper closing.",b(v,S));else{const N=c(q,k);if(N!==!0)return p(N.err.code,N.err.msg,b(v,S-q.length+N.err.line));if(w===!0)return p("InvalidXml","Multiple possible root nodes found.",b(v,S));k.unpairedTags.indexOf(B)!==-1||z.push({tagName:B,tagStartPos:O}),C=!0}for(S++;S<v.length;S++)if(v[S]==="<")if(v[S+1]==="!"){S++,S=n(v,S);continue}else if(v[S+1]==="?"){if(S=r(v,++S),S.err)return S}else break;else if(v[S]==="&"){const N=d(v,S);if(N==-1)return p("InvalidChar","char '&' is not expected.",b(v,S));S=N}else if(w===!0&&!t(v[S]))return p("InvalidXml","Extra text at the end",b(v,S));v[S]==="<"&&S--}}else{if(t(v[S]))continue;return p("InvalidChar","char '"+v[S]+"' is not expected.",b(v,S))}if(C){if(z.length==1)return p("InvalidTag","Unclosed tag '"+z[0].tagName+"'.",b(v,z[0].tagStartPos));if(z.length>0)return p("InvalidXml","Invalid '"+JSON.stringify(z.map(S=>S.tagName),null,4).replace(/\r?\n/g,"")+"' found.",{line:1,col:1})}else return p("InvalidXml","Start tag expected.",1);return!0};function t(v){return v===" "||v===" "||v===`
|
|
6024
6024
|
`||v==="\r"}function r(v,k){const z=k;for(;k<v.length;k++)if(v[k]=="?"||v[k]==" "){const C=v.substr(z,k-z);if(k>5&&C==="xml")return p("InvalidXml","XML declaration allowed only at the start of the document.",b(v,k));if(v[k]=="?"&&v[k+1]==">"){k++;break}else continue}return k}function n(v,k){if(v.length>k+5&&v[k+1]==="-"&&v[k+2]==="-"){for(k+=3;k<v.length;k++)if(v[k]==="-"&&v[k+1]==="-"&&v[k+2]===">"){k+=2;break}}else if(v.length>k+8&&v[k+1]==="D"&&v[k+2]==="O"&&v[k+3]==="C"&&v[k+4]==="T"&&v[k+5]==="Y"&&v[k+6]==="P"&&v[k+7]==="E"){let z=1;for(k+=8;k<v.length;k++)if(v[k]==="<")z++;else if(v[k]===">"&&(z--,z===0))break}else if(v.length>k+9&&v[k+1]==="["&&v[k+2]==="C"&&v[k+3]==="D"&&v[k+4]==="A"&&v[k+5]==="T"&&v[k+6]==="A"&&v[k+7]==="["){for(k+=8;k<v.length;k++)if(v[k]==="]"&&v[k+1]==="]"&&v[k+2]===">"){k+=2;break}}return k}const i='"',o="'";function s(v,k){let z="",C="",w=!1;for(;k<v.length;k++){if(v[k]===i||v[k]===o)C===""?C=v[k]:C!==v[k]||(C="");else if(v[k]===">"&&C===""){w=!0;break}z+=v[k]}return C!==""?!1:{value:z,index:k,tagClosed:w}}const l=new RegExp(`(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['"])(([\\s\\S])*?)\\5)?`,"g");function c(v,k){const z=e.getAllMatches(v,l),C={};for(let w=0;w<z.length;w++){if(z[w][1].length===0)return p("InvalidAttr","Attribute '"+z[w][2]+"' has no space in starting.",y(z[w]));if(z[w][3]!==void 0&&z[w][4]===void 0)return p("InvalidAttr","Attribute '"+z[w][2]+"' is without value.",y(z[w]));if(z[w][3]===void 0&&!k.allowBooleanAttributes)return p("InvalidAttr","boolean attribute '"+z[w][2]+"' is not allowed.",y(z[w]));const S=z[w][2];if(!m(S))return p("InvalidAttr","Attribute '"+S+"' is an invalid name.",y(z[w]));if(!C.hasOwnProperty(S))C[S]=1;else return p("InvalidAttr","Attribute '"+S+"' is repeated.",y(z[w]))}return!0}function u(v,k){let z=/\d/;for(v[k]==="x"&&(k++,z=/[\da-fA-F]/);k<v.length;k++){if(v[k]===";")return k;if(!v[k].match(z))break}return-1}function d(v,k){if(k++,v[k]===";")return-1;if(v[k]==="#")return k++,u(v,k);let z=0;for(;k<v.length;k++,z++)if(!(v[k].match(/\w/)&&z<20)){if(v[k]===";")break;return-1}return k}function p(v,k,z){return{err:{code:v,msg:k,line:z.line||z,col:z.col}}}function m(v){return e.isName(v)}function g(v){return e.isName(v)}function b(v,k){const z=v.substring(0,k).split(/\r?\n/);return{line:z.length,col:z[z.length-1].length+1}}function y(v){return v.startIndex+v[1].length}return i8}var SS={},XU;function PRe(){if(XU)return SS;XU=1;const e={preserveOrder:!1,attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,removeNSPrefix:!1,allowBooleanAttributes:!1,parseTagValue:!0,parseAttributeValue:!1,trimValues:!0,cdataPropName:!1,numberParseOptions:{hex:!0,leadingZeros:!0,eNotation:!0},tagValueProcessor:function(t,r){return r},attributeValueProcessor:function(t,r){return r},stopNodes:[],alwaysCreateTextNode:!1,isArray:()=>!1,commentPropName:!1,unpairedTags:[],processEntities:!0,htmlEntities:!1,ignoreDeclaration:!1,ignorePiTags:!1,transformTagName:!1,transformAttributeName:!1,updateTag:function(t,r,n){return t}},a=function(t){return Object.assign({},e,t)};return SS.buildOptions=a,SS.defaultOptions=e,SS}var s8,YU;function MRe(){if(YU)return s8;YU=1;class e{constructor(t){this.tagname=t,this.child=[],this[":@"]={}}add(t,r){t==="__proto__"&&(t="#__proto__"),this.child.push({[t]:r})}addChild(t){t.tagname==="__proto__"&&(t.tagname="#__proto__"),t[":@"]&&Object.keys(t[":@"]).length>0?this.child.push({[t.tagname]:t.child,":@":t[":@"]}):this.child.push({[t.tagname]:t.child})}}return s8=e,s8}var l8,eW;function TRe(){if(eW)return l8;eW=1;const e=o8();function a(c,u){const d={};if(c[u+3]==="O"&&c[u+4]==="C"&&c[u+5]==="T"&&c[u+6]==="Y"&&c[u+7]==="P"&&c[u+8]==="E"){u=u+9;let p=1,m=!1,g=!1;for(;u<c.length;u++)if(c[u]==="<"&&!g){if(m&&n(c,u))u+=7,[entityName,val,u]=t(c,u+1),val.indexOf("&")===-1&&(d[l(entityName)]={regx:RegExp(`&${entityName};`,"g"),val});else if(m&&i(c,u))u+=8;else if(m&&o(c,u))u+=8;else if(m&&s(c,u))u+=9;else if(r)g=!0;else throw new Error("Invalid DOCTYPE");p++}else if(c[u]===">"){if(g?c[u-1]==="-"&&c[u-2]==="-"&&(g=!1,p--):p--,p===0)break}else c[u]==="["&&(m=!0);if(p!==0)throw new Error("Unclosed DOCTYPE")}else throw new Error("Invalid Tag instead of DOCTYPE");return{entities:d,i:u}}function t(c,u){let d="";for(;u<c.length&&c[u]!=="'"&&c[u]!=='"';u++)d+=c[u];if(d=d.trim(),d.indexOf(" ")!==-1)throw new Error("External entites are not supported");const p=c[u++];let m="";for(;u<c.length&&c[u]!==p;u++)m+=c[u];return[d,m,u]}function r(c,u){return c[u+1]==="!"&&c[u+2]==="-"&&c[u+3]==="-"}function n(c,u){return c[u+1]==="!"&&c[u+2]==="E"&&c[u+3]==="N"&&c[u+4]==="T"&&c[u+5]==="I"&&c[u+6]==="T"&&c[u+7]==="Y"}function i(c,u){return c[u+1]==="!"&&c[u+2]==="E"&&c[u+3]==="L"&&c[u+4]==="E"&&c[u+5]==="M"&&c[u+6]==="E"&&c[u+7]==="N"&&c[u+8]==="T"}function o(c,u){return c[u+1]==="!"&&c[u+2]==="A"&&c[u+3]==="T"&&c[u+4]==="T"&&c[u+5]==="L"&&c[u+6]==="I"&&c[u+7]==="S"&&c[u+8]==="T"}function s(c,u){return c[u+1]==="!"&&c[u+2]==="N"&&c[u+3]==="O"&&c[u+4]==="T"&&c[u+5]==="A"&&c[u+6]==="T"&&c[u+7]==="I"&&c[u+8]==="O"&&c[u+9]==="N"}function l(c){if(e.isName(c))return c;throw new Error(`Invalid entity name ${c}`)}return l8=a,l8}var c8,aW;function BRe(){if(aW)return c8;aW=1;const e=/^[-+]?0x[a-fA-F0-9]+$/,a=/^([\-\+])?(0*)([0-9]*(\.[0-9]*)?)$/,t={hex:!0,leadingZeros:!0,decimalPoint:".",eNotation:!0};function r(o,s={}){if(s=Object.assign({},t,s),!o||typeof o!="string")return o;let l=o.trim();if(s.skipLike!==void 0&&s.skipLike.test(l))return o;if(o==="0")return 0;if(s.hex&&e.test(l))return i(l,16);if(l.search(/[eE]/)!==-1){const c=l.match(/^([-\+])?(0*)([0-9]*(\.[0-9]*)?[eE][-\+]?[0-9]+)$/);if(c){if(s.leadingZeros)l=(c[1]||"")+c[3];else if(!(c[2]==="0"&&c[3][0]==="."))return o;return s.eNotation?Number(l):o}else return o}else{const c=a.exec(l);if(c){const u=c[1],d=c[2];let p=n(c[3]);if(!s.leadingZeros&&d.length>0&&u&&l[2]!=="."||!s.leadingZeros&&d.length>0&&!u&&l[1]!==".")return o;if(s.leadingZeros&&d===o)return 0;{const m=Number(l),g=""+m;return g.search(/[eE]/)!==-1?s.eNotation?m:o:l.indexOf(".")!==-1?g==="0"&&p===""||g===p||u&&g==="-"+p?m:o:d?p===g||u+p===g?m:o:l===g||l===u+g?m:o}}else return o}}function n(o){return o&&o.indexOf(".")!==-1&&(o=o.replace(/0+$/,""),o==="."?o="0":o[0]==="."?o="0"+o:o[o.length-1]==="."&&(o=o.substr(0,o.length-1))),o}function i(o,s){if(parseInt)return parseInt(o,s);if(Number.parseInt)return Number.parseInt(o,s);if(window&&window.parseInt)return window.parseInt(o,s);throw new Error("parseInt, Number.parseInt, window.parseInt are not supported")}return c8=r,c8}var u8,tW;function rW(){if(tW)return u8;tW=1;function e(a){return typeof a=="function"?a:Array.isArray(a)?t=>{for(const r of a)if(typeof r=="string"&&t===r||r instanceof RegExp&&r.test(t))return!0}:()=>!1}return u8=e,u8}var d8,nW;function ERe(){if(nW)return d8;nW=1;const e=o8(),a=MRe(),t=TRe(),r=BRe(),n=rW();class i{constructor(S){this.options=S,this.currentNode=null,this.tagsNodeStack=[],this.docTypeEntities={},this.lastEntities={apos:{regex:/&(apos|#39|#x27);/g,val:"'"},gt:{regex:/&(gt|#62|#x3E);/g,val:">"},lt:{regex:/&(lt|#60|#x3C);/g,val:"<"},quot:{regex:/&(quot|#34|#x22);/g,val:'"'}},this.ampEntity={regex:/&(amp|#38|#x26);/g,val:"&"},this.htmlEntities={space:{regex:/&(nbsp|#160);/g,val:" "},cent:{regex:/&(cent|#162);/g,val:"\xA2"},pound:{regex:/&(pound|#163);/g,val:"\xA3"},yen:{regex:/&(yen|#165);/g,val:"\xA5"},euro:{regex:/&(euro|#8364);/g,val:"\u20AC"},copyright:{regex:/&(copy|#169);/g,val:"\xA9"},reg:{regex:/&(reg|#174);/g,val:"\xAE"},inr:{regex:/&(inr|#8377);/g,val:"\u20B9"},num_dec:{regex:/&#([0-9]{1,7});/g,val:(O,A)=>String.fromCharCode(Number.parseInt(A,10))},num_hex:{regex:/&#x([0-9a-fA-F]{1,6});/g,val:(O,A)=>String.fromCharCode(Number.parseInt(A,16))}},this.addExternalEntities=o,this.parseXml=d,this.parseTextData=s,this.resolveNameSpace=l,this.buildAttributesMap=u,this.isItStopNode=b,this.replaceEntitiesValue=m,this.readStopNodeData=z,this.saveTextToParentTag=g,this.addChild=p,this.ignoreAttributesFn=n(this.options.ignoreAttributes)}}function o(w){const S=Object.keys(w);for(let O=0;O<S.length;O++){const A=S[O];this.lastEntities[A]={regex:new RegExp("&"+A+";","g"),val:w[A]}}}function s(w,S,O,A,B,L,q){if(w!==void 0&&(this.options.trimValues&&!A&&(w=w.trim()),w.length>0)){q||(w=this.replaceEntitiesValue(w));const N=this.options.tagValueProcessor(S,w,O,B,L);return N==null?w:typeof N!=typeof w||N!==w?N:this.options.trimValues?C(w,this.options.parseTagValue,this.options.numberParseOptions):w.trim()===w?C(w,this.options.parseTagValue,this.options.numberParseOptions):w}}function l(w){if(this.options.removeNSPrefix){const S=w.split(":"),O=w.charAt(0)==="/"?"/":"";if(S[0]==="xmlns")return"";S.length===2&&(w=O+S[1])}return w}const c=new RegExp(`([^\\s=]+)\\s*(=\\s*(['"])([\\s\\S]*?)\\3)?`,"gm");function u(w,S,O){if(this.options.ignoreAttributes!==!0&&typeof w=="string"){const A=e.getAllMatches(w,c),B=A.length,L={};for(let q=0;q<B;q++){const N=this.resolveNameSpace(A[q][1]);if(this.ignoreAttributesFn(N,S))continue;let U=A[q][4],D=this.options.attributeNamePrefix+N;if(N.length)if(this.options.transformAttributeName&&(D=this.options.transformAttributeName(D)),D==="__proto__"&&(D="#__proto__"),U!==void 0){this.options.trimValues&&(U=U.trim()),U=this.replaceEntitiesValue(U);const Y=this.options.attributeValueProcessor(N,U,S);Y==null?L[D]=U:typeof Y!=typeof U||Y!==U?L[D]=Y:L[D]=C(U,this.options.parseAttributeValue,this.options.numberParseOptions)}else this.options.allowBooleanAttributes&&(L[D]=!0)}if(!Object.keys(L).length)return;if(this.options.attributesGroupName){const q={};return q[this.options.attributesGroupName]=L,q}return L}}const d=function(w){w=w.replace(/\r\n?/g,`
|
|
@@ -10274,7 +10274,7 @@ ${n.indent}`,variablesPrefix:n.variablesPrefix,capitalize:!0,lang:Rt.PHP});p.len
|
|
|
10274
10274
|
*
|
|
10275
10275
|
* @author Feross Aboukhadijeh <https://feross.org>
|
|
10276
10276
|
* @license MIT
|
|
10277
|
-
*/var Ete;function d1(){return Ete||(Ete=1,(function(e){const a=Uaa(),t=Waa(),r=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;e.Buffer=s,e.SlowBuffer=k,e.INSPECT_MAX_BYTES=50;const n=2147483647;e.kMaxLength=n,s.TYPED_ARRAY_SUPPORT=i(),!s.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function i(){try{const E=new Uint8Array(1),ae={foo:function(){return 42}};return Object.setPrototypeOf(ae,Uint8Array.prototype),Object.setPrototypeOf(E,ae),E.foo()===42}catch{return!1}}Object.defineProperty(s.prototype,"parent",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.buffer}}),Object.defineProperty(s.prototype,"offset",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.byteOffset}});function o(E){if(E>n)throw new RangeError('The value "'+E+'" is invalid for option "size"');const ae=new Uint8Array(E);return Object.setPrototypeOf(ae,s.prototype),ae}function s(E,ae,le){if(typeof E=="number"){if(typeof ae=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return d(E)}return l(E,ae,le)}s.poolSize=8192;function l(E,ae,le){if(typeof E=="string")return p(E,ae);if(ArrayBuffer.isView(E))return g(E);if(E==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof E);if(he(E,ArrayBuffer)||E&&he(E.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(he(E,SharedArrayBuffer)||E&&he(E.buffer,SharedArrayBuffer)))return b(E,ae,le);if(typeof E=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const Ce=E.valueOf&&E.valueOf();if(Ce!=null&&Ce!==E)return s.from(Ce,ae,le);const Me=y(E);if(Me)return Me;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof E[Symbol.toPrimitive]=="function")return s.from(E[Symbol.toPrimitive]("string"),ae,le);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof E)}s.from=function(E,ae,le){return l(E,ae,le)},Object.setPrototypeOf(s.prototype,Uint8Array.prototype),Object.setPrototypeOf(s,Uint8Array);function c(E){if(typeof E!="number")throw new TypeError('"size" argument must be of type number');if(E<0)throw new RangeError('The value "'+E+'" is invalid for option "size"')}function u(E,ae,le){return c(E),E<=0?o(E):ae!==void 0?typeof le=="string"?o(E).fill(ae,le):o(E).fill(ae):o(E)}s.alloc=function(E,ae,le){return u(E,ae,le)};function d(E){return c(E),o(E<0?0:v(E)|0)}s.allocUnsafe=function(E){return d(E)},s.allocUnsafeSlow=function(E){return d(E)};function p(E,ae){if((typeof ae!="string"||ae==="")&&(ae="utf8"),!s.isEncoding(ae))throw new TypeError("Unknown encoding: "+ae);const le=z(E,ae)|0;let Ce=o(le);const Me=Ce.write(E,ae);return Me!==le&&(Ce=Ce.slice(0,Me)),Ce}function m(E){const ae=E.length<0?0:v(E.length)|0,le=o(ae);for(let Ce=0;Ce<ae;Ce+=1)le[Ce]=E[Ce]&255;return le}function g(E){if(he(E,Uint8Array)){const ae=new Uint8Array(E);return b(ae.buffer,ae.byteOffset,ae.byteLength)}return m(E)}function b(E,ae,le){if(ae<0||E.byteLength<ae)throw new RangeError('"offset" is outside of buffer bounds');if(E.byteLength<ae+(le||0))throw new RangeError('"length" is outside of buffer bounds');let Ce;return ae===void 0&&le===void 0?Ce=new Uint8Array(E):le===void 0?Ce=new Uint8Array(E,ae):Ce=new Uint8Array(E,ae,le),Object.setPrototypeOf(Ce,s.prototype),Ce}function y(E){if(s.isBuffer(E)){const ae=v(E.length)|0,le=o(ae);return le.length===0||E.copy(le,0,0,ae),le}if(E.length!==void 0)return typeof E.length!="number"||xe(E.length)?o(0):m(E);if(E.type==="Buffer"&&Array.isArray(E.data))return m(E.data)}function v(E){if(E>=n)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+n.toString(16)+" bytes");return E|0}function k(E){return+E!=E&&(E=0),s.alloc(+E)}s.isBuffer=function(E){return E!=null&&E._isBuffer===!0&&E!==s.prototype},s.compare=function(E,ae){if(he(E,Uint8Array)&&(E=s.from(E,E.offset,E.byteLength)),he(ae,Uint8Array)&&(ae=s.from(ae,ae.offset,ae.byteLength)),!s.isBuffer(E)||!s.isBuffer(ae))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(E===ae)return 0;let le=E.length,Ce=ae.length;for(let Me=0,Te=Math.min(le,Ce);Me<Te;++Me)if(E[Me]!==ae[Me]){le=E[Me],Ce=ae[Me];break}return le<Ce?-1:Ce<le?1:0},s.isEncoding=function(E){switch(String(E).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},s.concat=function(E,ae){if(!Array.isArray(E))throw new TypeError('"list" argument must be an Array of Buffers');if(E.length===0)return s.alloc(0);let le;if(ae===void 0)for(ae=0,le=0;le<E.length;++le)ae+=E[le].length;const Ce=s.allocUnsafe(ae);let Me=0;for(le=0;le<E.length;++le){let Te=E[le];if(he(Te,Uint8Array))Me+Te.length>Ce.length?(s.isBuffer(Te)||(Te=s.from(Te)),Te.copy(Ce,Me)):Uint8Array.prototype.set.call(Ce,Te,Me);else if(s.isBuffer(Te))Te.copy(Ce,Me);else throw new TypeError('"list" argument must be an Array of Buffers');Me+=Te.length}return Ce};function z(E,ae){if(s.isBuffer(E))return E.length;if(ArrayBuffer.isView(E)||he(E,ArrayBuffer))return E.byteLength;if(typeof E!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof E);const le=E.length,Ce=arguments.length>2&&arguments[2]===!0;if(!Ce&&le===0)return 0;let Me=!1;for(;;)switch(ae){case"ascii":case"latin1":case"binary":return le;case"utf8":case"utf-8":return Q(E).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return le*2;case"hex":return le>>>1;case"base64":return fe(E).length;default:if(Me)return Ce?-1:Q(E).length;ae=(""+ae).toLowerCase(),Me=!0}}s.byteLength=z;function C(E,ae,le){let Ce=!1;if((ae===void 0||ae<0)&&(ae=0),ae>this.length||((le===void 0||le>this.length)&&(le=this.length),le<=0)||(le>>>=0,ae>>>=0,le<=ae))return"";for(E||(E="utf8");;)switch(E){case"hex":return me(this,ae,le);case"utf8":case"utf-8":return D(this,ae,le);case"ascii":return ue(this,ae,le);case"latin1":case"binary":return ne(this,ae,le);case"base64":return U(this,ae,le);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return I(this,ae,le);default:if(Ce)throw new TypeError("Unknown encoding: "+E);E=(E+"").toLowerCase(),Ce=!0}}s.prototype._isBuffer=!0;function w(E,ae,le){const Ce=E[ae];E[ae]=E[le],E[le]=Ce}s.prototype.swap16=function(){const E=this.length;if(E%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let ae=0;ae<E;ae+=2)w(this,ae,ae+1);return this},s.prototype.swap32=function(){const E=this.length;if(E%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let ae=0;ae<E;ae+=4)w(this,ae,ae+3),w(this,ae+1,ae+2);return this},s.prototype.swap64=function(){const E=this.length;if(E%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let ae=0;ae<E;ae+=8)w(this,ae,ae+7),w(this,ae+1,ae+6),w(this,ae+2,ae+5),w(this,ae+3,ae+4);return this},s.prototype.toString=function(){const E=this.length;return E===0?"":arguments.length===0?D(this,0,E):C.apply(this,arguments)},s.prototype.toLocaleString=s.prototype.toString,s.prototype.equals=function(E){if(!s.isBuffer(E))throw new TypeError("Argument must be a Buffer");return this===E?!0:s.compare(this,E)===0},s.prototype.inspect=function(){let E="";const ae=e.INSPECT_MAX_BYTES;return E=this.toString("hex",0,ae).replace(/(.{2})/g,"$1 ").trim(),this.length>ae&&(E+=" ... "),"<Buffer "+E+">"},r&&(s.prototype[r]=s.prototype.inspect),s.prototype.compare=function(E,ae,le,Ce,Me){if(he(E,Uint8Array)&&(E=s.from(E,E.offset,E.byteLength)),!s.isBuffer(E))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof E);if(ae===void 0&&(ae=0),le===void 0&&(le=E?E.length:0),Ce===void 0&&(Ce=0),Me===void 0&&(Me=this.length),ae<0||le>E.length||Ce<0||Me>this.length)throw new RangeError("out of range index");if(Ce>=Me&&ae>=le)return 0;if(Ce>=Me)return-1;if(ae>=le)return 1;if(ae>>>=0,le>>>=0,Ce>>>=0,Me>>>=0,this===E)return 0;let Te=Me-Ce,De=le-ae;const ra=Math.min(Te,De),pa=this.slice(Ce,Me),va=E.slice(ae,le);for(let sa=0;sa<ra;++sa)if(pa[sa]!==va[sa]){Te=pa[sa],De=va[sa];break}return Te<De?-1:De<Te?1:0};function S(E,ae,le,Ce,Me){if(E.length===0)return-1;if(typeof le=="string"?(Ce=le,le=0):le>2147483647?le=2147483647:le<-2147483648&&(le=-2147483648),le=+le,xe(le)&&(le=Me?0:E.length-1),le<0&&(le=E.length+le),le>=E.length){if(Me)return-1;le=E.length-1}else if(le<0)if(Me)le=0;else return-1;if(typeof ae=="string"&&(ae=s.from(ae,Ce)),s.isBuffer(ae))return ae.length===0?-1:O(E,ae,le,Ce,Me);if(typeof ae=="number")return ae=ae&255,typeof Uint8Array.prototype.indexOf=="function"?Me?Uint8Array.prototype.indexOf.call(E,ae,le):Uint8Array.prototype.lastIndexOf.call(E,ae,le):O(E,[ae],le,Ce,Me);throw new TypeError("val must be string, number or Buffer")}function O(E,ae,le,Ce,Me){let Te=1,De=E.length,ra=ae.length;if(Ce!==void 0&&(Ce=String(Ce).toLowerCase(),Ce==="ucs2"||Ce==="ucs-2"||Ce==="utf16le"||Ce==="utf-16le")){if(E.length<2||ae.length<2)return-1;Te=2,De/=2,ra/=2,le/=2}function pa(sa,ka){return Te===1?sa[ka]:sa.readUInt16BE(ka*Te)}let va;if(Me){let sa=-1;for(va=le;va<De;va++)if(pa(E,va)===pa(ae,sa===-1?0:va-sa)){if(sa===-1&&(sa=va),va-sa+1===ra)return sa*Te}else sa!==-1&&(va-=va-sa),sa=-1}else for(le+ra>De&&(le=De-ra),va=le;va>=0;va--){let sa=!0;for(let ka=0;ka<ra;ka++)if(pa(E,va+ka)!==pa(ae,ka)){sa=!1;break}if(sa)return va}return-1}s.prototype.includes=function(E,ae,le){return this.indexOf(E,ae,le)!==-1},s.prototype.indexOf=function(E,ae,le){return S(this,E,ae,le,!0)},s.prototype.lastIndexOf=function(E,ae,le){return S(this,E,ae,le,!1)};function A(E,ae,le,Ce){le=Number(le)||0;const Me=E.length-le;Ce?(Ce=Number(Ce),Ce>Me&&(Ce=Me)):Ce=Me;const Te=ae.length;Ce>Te/2&&(Ce=Te/2);let De;for(De=0;De<Ce;++De){const ra=parseInt(ae.substr(De*2,2),16);if(xe(ra))return De;E[le+De]=ra}return De}function B(E,ae,le,Ce){return ge(Q(ae,E.length-le),E,le,Ce)}function L(E,ae,le,Ce){return ge(re(ae),E,le,Ce)}function q(E,ae,le,Ce){return ge(fe(ae),E,le,Ce)}function N(E,ae,le,Ce){return ge(de(ae,E.length-le),E,le,Ce)}s.prototype.write=function(E,ae,le,Ce){if(ae===void 0)Ce="utf8",le=this.length,ae=0;else if(le===void 0&&typeof ae=="string")Ce=ae,le=this.length,ae=0;else if(isFinite(ae))ae=ae>>>0,isFinite(le)?(le=le>>>0,Ce===void 0&&(Ce="utf8")):(Ce=le,le=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const Me=this.length-ae;if((le===void 0||le>Me)&&(le=Me),E.length>0&&(le<0||ae<0)||ae>this.length)throw new RangeError("Attempt to write outside buffer bounds");Ce||(Ce="utf8");let Te=!1;for(;;)switch(Ce){case"hex":return A(this,E,ae,le);case"utf8":case"utf-8":return B(this,E,ae,le);case"ascii":case"latin1":case"binary":return L(this,E,ae,le);case"base64":return q(this,E,ae,le);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return N(this,E,ae,le);default:if(Te)throw new TypeError("Unknown encoding: "+Ce);Ce=(""+Ce).toLowerCase(),Te=!0}},s.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function U(E,ae,le){return ae===0&&le===E.length?a.fromByteArray(E):a.fromByteArray(E.slice(ae,le))}function D(E,ae,le){le=Math.min(E.length,le);const Ce=[];let Me=ae;for(;Me<le;){const Te=E[Me];let De=null,ra=Te>239?4:Te>223?3:Te>191?2:1;if(Me+ra<=le){let pa,va,sa,ka;switch(ra){case 1:Te<128&&(De=Te);break;case 2:pa=E[Me+1],(pa&192)===128&&(ka=(Te&31)<<6|pa&63,ka>127&&(De=ka));break;case 3:pa=E[Me+1],va=E[Me+2],(pa&192)===128&&(va&192)===128&&(ka=(Te&15)<<12|(pa&63)<<6|va&63,ka>2047&&(ka<55296||ka>57343)&&(De=ka));break;case 4:pa=E[Me+1],va=E[Me+2],sa=E[Me+3],(pa&192)===128&&(va&192)===128&&(sa&192)===128&&(ka=(Te&15)<<18|(pa&63)<<12|(va&63)<<6|sa&63,ka>65535&&ka<1114112&&(De=ka))}}De===null?(De=65533,ra=1):De>65535&&(De-=65536,Ce.push(De>>>10&1023|55296),De=56320|De&1023),Ce.push(De),Me+=ra}return te(Ce)}const Y=4096;function te(E){const ae=E.length;if(ae<=Y)return String.fromCharCode.apply(String,E);let le="",Ce=0;for(;Ce<ae;)le+=String.fromCharCode.apply(String,E.slice(Ce,Ce+=Y));return le}function ue(E,ae,le){let Ce="";le=Math.min(E.length,le);for(let Me=ae;Me<le;++Me)Ce+=String.fromCharCode(E[Me]&127);return Ce}function ne(E,ae,le){let Ce="";le=Math.min(E.length,le);for(let Me=ae;Me<le;++Me)Ce+=String.fromCharCode(E[Me]);return Ce}function me(E,ae,le){const Ce=E.length;(!ae||ae<0)&&(ae=0),(!le||le<0||le>Ce)&&(le=Ce);let Me="";for(let Te=ae;Te<le;++Te)Me+=Oe[E[Te]];return Me}function I(E,ae,le){const Ce=E.slice(ae,le);let Me="";for(let Te=0;Te<Ce.length-1;Te+=2)Me+=String.fromCharCode(Ce[Te]+Ce[Te+1]*256);return Me}s.prototype.slice=function(E,ae){const le=this.length;E=~~E,ae=ae===void 0?le:~~ae,E<0?(E+=le,E<0&&(E=0)):E>le&&(E=le),ae<0?(ae+=le,ae<0&&(ae=0)):ae>le&&(ae=le),ae<E&&(ae=E);const Ce=this.subarray(E,ae);return Object.setPrototypeOf(Ce,s.prototype),Ce};function K(E,ae,le){if(E%1!==0||E<0)throw new RangeError("offset is not uint");if(E+ae>le)throw new RangeError("Trying to access beyond buffer length")}s.prototype.readUintLE=s.prototype.readUIntLE=function(E,ae,le){E=E>>>0,ae=ae>>>0,le||K(E,ae,this.length);let Ce=this[E],Me=1,Te=0;for(;++Te<ae&&(Me*=256);)Ce+=this[E+Te]*Me;return Ce},s.prototype.readUintBE=s.prototype.readUIntBE=function(E,ae,le){E=E>>>0,ae=ae>>>0,le||K(E,ae,this.length);let Ce=this[E+--ae],Me=1;for(;ae>0&&(Me*=256);)Ce+=this[E+--ae]*Me;return Ce},s.prototype.readUint8=s.prototype.readUInt8=function(E,ae){return E=E>>>0,ae||K(E,1,this.length),this[E]},s.prototype.readUint16LE=s.prototype.readUInt16LE=function(E,ae){return E=E>>>0,ae||K(E,2,this.length),this[E]|this[E+1]<<8},s.prototype.readUint16BE=s.prototype.readUInt16BE=function(E,ae){return E=E>>>0,ae||K(E,2,this.length),this[E]<<8|this[E+1]},s.prototype.readUint32LE=s.prototype.readUInt32LE=function(E,ae){return E=E>>>0,ae||K(E,4,this.length),(this[E]|this[E+1]<<8|this[E+2]<<16)+this[E+3]*16777216},s.prototype.readUint32BE=s.prototype.readUInt32BE=function(E,ae){return E=E>>>0,ae||K(E,4,this.length),this[E]*16777216+(this[E+1]<<16|this[E+2]<<8|this[E+3])},s.prototype.readBigUInt64LE=_e(function(E){E=E>>>0,oe(E,"offset");const ae=this[E],le=this[E+7];(ae===void 0||le===void 0)&&G(E,this.length-8);const Ce=ae+this[++E]*2**8+this[++E]*2**16+this[++E]*2**24,Me=this[++E]+this[++E]*2**8+this[++E]*2**16+le*2**24;return BigInt(Ce)+(BigInt(Me)<<BigInt(32))}),s.prototype.readBigUInt64BE=_e(function(E){E=E>>>0,oe(E,"offset");const ae=this[E],le=this[E+7];(ae===void 0||le===void 0)&&G(E,this.length-8);const Ce=ae*2**24+this[++E]*2**16+this[++E]*2**8+this[++E],Me=this[++E]*2**24+this[++E]*2**16+this[++E]*2**8+le;return(BigInt(Ce)<<BigInt(32))+BigInt(Me)}),s.prototype.readIntLE=function(E,ae,le){E=E>>>0,ae=ae>>>0,le||K(E,ae,this.length);let Ce=this[E],Me=1,Te=0;for(;++Te<ae&&(Me*=256);)Ce+=this[E+Te]*Me;return Me*=128,Ce>=Me&&(Ce-=Math.pow(2,8*ae)),Ce},s.prototype.readIntBE=function(E,ae,le){E=E>>>0,ae=ae>>>0,le||K(E,ae,this.length);let Ce=ae,Me=1,Te=this[E+--Ce];for(;Ce>0&&(Me*=256);)Te+=this[E+--Ce]*Me;return Me*=128,Te>=Me&&(Te-=Math.pow(2,8*ae)),Te},s.prototype.readInt8=function(E,ae){return E=E>>>0,ae||K(E,1,this.length),this[E]&128?(255-this[E]+1)*-1:this[E]},s.prototype.readInt16LE=function(E,ae){E=E>>>0,ae||K(E,2,this.length);const le=this[E]|this[E+1]<<8;return le&32768?le|4294901760:le},s.prototype.readInt16BE=function(E,ae){E=E>>>0,ae||K(E,2,this.length);const le=this[E+1]|this[E]<<8;return le&32768?le|4294901760:le},s.prototype.readInt32LE=function(E,ae){return E=E>>>0,ae||K(E,4,this.length),this[E]|this[E+1]<<8|this[E+2]<<16|this[E+3]<<24},s.prototype.readInt32BE=function(E,ae){return E=E>>>0,ae||K(E,4,this.length),this[E]<<24|this[E+1]<<16|this[E+2]<<8|this[E+3]},s.prototype.readBigInt64LE=_e(function(E){E=E>>>0,oe(E,"offset");const ae=this[E],le=this[E+7];(ae===void 0||le===void 0)&&G(E,this.length-8);const Ce=this[E+4]+this[E+5]*2**8+this[E+6]*2**16+(le<<24);return(BigInt(Ce)<<BigInt(32))+BigInt(ae+this[++E]*2**8+this[++E]*2**16+this[++E]*2**24)}),s.prototype.readBigInt64BE=_e(function(E){E=E>>>0,oe(E,"offset");const ae=this[E],le=this[E+7];(ae===void 0||le===void 0)&&G(E,this.length-8);const Ce=(ae<<24)+this[++E]*2**16+this[++E]*2**8+this[++E];return(BigInt(Ce)<<BigInt(32))+BigInt(this[++E]*2**24+this[++E]*2**16+this[++E]*2**8+le)}),s.prototype.readFloatLE=function(E,ae){return E=E>>>0,ae||K(E,4,this.length),t.read(this,E,!0,23,4)},s.prototype.readFloatBE=function(E,ae){return E=E>>>0,ae||K(E,4,this.length),t.read(this,E,!1,23,4)},s.prototype.readDoubleLE=function(E,ae){return E=E>>>0,ae||K(E,8,this.length),t.read(this,E,!0,52,8)},s.prototype.readDoubleBE=function(E,ae){return E=E>>>0,ae||K(E,8,this.length),t.read(this,E,!1,52,8)};function W(E,ae,le,Ce,Me,Te){if(!s.isBuffer(E))throw new TypeError('"buffer" argument must be a Buffer instance');if(ae>Me||ae<Te)throw new RangeError('"value" argument is out of bounds');if(le+Ce>E.length)throw new RangeError("Index out of range")}s.prototype.writeUintLE=s.prototype.writeUIntLE=function(E,ae,le,Ce){if(E=+E,ae=ae>>>0,le=le>>>0,!Ce){const De=Math.pow(2,8*le)-1;W(this,E,ae,le,De,0)}let Me=1,Te=0;for(this[ae]=E&255;++Te<le&&(Me*=256);)this[ae+Te]=E/Me&255;return ae+le},s.prototype.writeUintBE=s.prototype.writeUIntBE=function(E,ae,le,Ce){if(E=+E,ae=ae>>>0,le=le>>>0,!Ce){const De=Math.pow(2,8*le)-1;W(this,E,ae,le,De,0)}let Me=le-1,Te=1;for(this[ae+Me]=E&255;--Me>=0&&(Te*=256);)this[ae+Me]=E/Te&255;return ae+le},s.prototype.writeUint8=s.prototype.writeUInt8=function(E,ae,le){return E=+E,ae=ae>>>0,le||W(this,E,ae,1,255,0),this[ae]=E&255,ae+1},s.prototype.writeUint16LE=s.prototype.writeUInt16LE=function(E,ae,le){return E=+E,ae=ae>>>0,le||W(this,E,ae,2,65535,0),this[ae]=E&255,this[ae+1]=E>>>8,ae+2},s.prototype.writeUint16BE=s.prototype.writeUInt16BE=function(E,ae,le){return E=+E,ae=ae>>>0,le||W(this,E,ae,2,65535,0),this[ae]=E>>>8,this[ae+1]=E&255,ae+2},s.prototype.writeUint32LE=s.prototype.writeUInt32LE=function(E,ae,le){return E=+E,ae=ae>>>0,le||W(this,E,ae,4,4294967295,0),this[ae+3]=E>>>24,this[ae+2]=E>>>16,this[ae+1]=E>>>8,this[ae]=E&255,ae+4},s.prototype.writeUint32BE=s.prototype.writeUInt32BE=function(E,ae,le){return E=+E,ae=ae>>>0,le||W(this,E,ae,4,4294967295,0),this[ae]=E>>>24,this[ae+1]=E>>>16,this[ae+2]=E>>>8,this[ae+3]=E&255,ae+4};function V(E,ae,le,Ce,Me){$(ae,Ce,Me,E,le,7);let Te=Number(ae&BigInt(4294967295));E[le++]=Te,Te=Te>>8,E[le++]=Te,Te=Te>>8,E[le++]=Te,Te=Te>>8,E[le++]=Te;let De=Number(ae>>BigInt(32)&BigInt(4294967295));return E[le++]=De,De=De>>8,E[le++]=De,De=De>>8,E[le++]=De,De=De>>8,E[le++]=De,le}function P(E,ae,le,Ce,Me){$(ae,Ce,Me,E,le,7);let Te=Number(ae&BigInt(4294967295));E[le+7]=Te,Te=Te>>8,E[le+6]=Te,Te=Te>>8,E[le+5]=Te,Te=Te>>8,E[le+4]=Te;let De=Number(ae>>BigInt(32)&BigInt(4294967295));return E[le+3]=De,De=De>>8,E[le+2]=De,De=De>>8,E[le+1]=De,De=De>>8,E[le]=De,le+8}s.prototype.writeBigUInt64LE=_e(function(E,ae=0){return V(this,E,ae,BigInt(0),BigInt("0xffffffffffffffff"))}),s.prototype.writeBigUInt64BE=_e(function(E,ae=0){return P(this,E,ae,BigInt(0),BigInt("0xffffffffffffffff"))}),s.prototype.writeIntLE=function(E,ae,le,Ce){if(E=+E,ae=ae>>>0,!Ce){const ra=Math.pow(2,8*le-1);W(this,E,ae,le,ra-1,-ra)}let Me=0,Te=1,De=0;for(this[ae]=E&255;++Me<le&&(Te*=256);)E<0&&De===0&&this[ae+Me-1]!==0&&(De=1),this[ae+Me]=(E/Te>>0)-De&255;return ae+le},s.prototype.writeIntBE=function(E,ae,le,Ce){if(E=+E,ae=ae>>>0,!Ce){const ra=Math.pow(2,8*le-1);W(this,E,ae,le,ra-1,-ra)}let Me=le-1,Te=1,De=0;for(this[ae+Me]=E&255;--Me>=0&&(Te*=256);)E<0&&De===0&&this[ae+Me+1]!==0&&(De=1),this[ae+Me]=(E/Te>>0)-De&255;return ae+le},s.prototype.writeInt8=function(E,ae,le){return E=+E,ae=ae>>>0,le||W(this,E,ae,1,127,-128),E<0&&(E=255+E+1),this[ae]=E&255,ae+1},s.prototype.writeInt16LE=function(E,ae,le){return E=+E,ae=ae>>>0,le||W(this,E,ae,2,32767,-32768),this[ae]=E&255,this[ae+1]=E>>>8,ae+2},s.prototype.writeInt16BE=function(E,ae,le){return E=+E,ae=ae>>>0,le||W(this,E,ae,2,32767,-32768),this[ae]=E>>>8,this[ae+1]=E&255,ae+2},s.prototype.writeInt32LE=function(E,ae,le){return E=+E,ae=ae>>>0,le||W(this,E,ae,4,2147483647,-2147483648),this[ae]=E&255,this[ae+1]=E>>>8,this[ae+2]=E>>>16,this[ae+3]=E>>>24,ae+4},s.prototype.writeInt32BE=function(E,ae,le){return E=+E,ae=ae>>>0,le||W(this,E,ae,4,2147483647,-2147483648),E<0&&(E=4294967295+E+1),this[ae]=E>>>24,this[ae+1]=E>>>16,this[ae+2]=E>>>8,this[ae+3]=E&255,ae+4},s.prototype.writeBigInt64LE=_e(function(E,ae=0){return V(this,E,ae,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),s.prototype.writeBigInt64BE=_e(function(E,ae=0){return P(this,E,ae,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function _(E,ae,le,Ce,Me,Te){if(le+Ce>E.length)throw new RangeError("Index out of range");if(le<0)throw new RangeError("Index out of range")}function F(E,ae,le,Ce,Me){return ae=+ae,le=le>>>0,Me||_(E,ae,le,4),t.write(E,ae,le,Ce,23,4),le+4}s.prototype.writeFloatLE=function(E,ae,le){return F(this,E,ae,!0,le)},s.prototype.writeFloatBE=function(E,ae,le){return F(this,E,ae,!1,le)};function ee(E,ae,le,Ce,Me){return ae=+ae,le=le>>>0,Me||_(E,ae,le,8),t.write(E,ae,le,Ce,52,8),le+8}s.prototype.writeDoubleLE=function(E,ae,le){return ee(this,E,ae,!0,le)},s.prototype.writeDoubleBE=function(E,ae,le){return ee(this,E,ae,!1,le)},s.prototype.copy=function(E,ae,le,Ce){if(!s.isBuffer(E))throw new TypeError("argument should be a Buffer");if(le||(le=0),!Ce&&Ce!==0&&(Ce=this.length),ae>=E.length&&(ae=E.length),ae||(ae=0),Ce>0&&Ce<le&&(Ce=le),Ce===le||E.length===0||this.length===0)return 0;if(ae<0)throw new RangeError("targetStart out of bounds");if(le<0||le>=this.length)throw new RangeError("Index out of range");if(Ce<0)throw new RangeError("sourceEnd out of bounds");Ce>this.length&&(Ce=this.length),E.length-ae<Ce-le&&(Ce=E.length-ae+le);const Me=Ce-le;return this===E&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(ae,le,Ce):Uint8Array.prototype.set.call(E,this.subarray(le,Ce),ae),Me},s.prototype.fill=function(E,ae,le,Ce){if(typeof E=="string"){if(typeof ae=="string"?(Ce=ae,ae=0,le=this.length):typeof le=="string"&&(Ce=le,le=this.length),Ce!==void 0&&typeof Ce!="string")throw new TypeError("encoding must be a string");if(typeof Ce=="string"&&!s.isEncoding(Ce))throw new TypeError("Unknown encoding: "+Ce);if(E.length===1){const Te=E.charCodeAt(0);(Ce==="utf8"&&Te<128||Ce==="latin1")&&(E=Te)}}else typeof E=="number"?E=E&255:typeof E=="boolean"&&(E=Number(E));if(ae<0||this.length<ae||this.length<le)throw new RangeError("Out of range index");if(le<=ae)return this;ae=ae>>>0,le=le===void 0?this.length:le>>>0,E||(E=0);let Me;if(typeof E=="number")for(Me=ae;Me<le;++Me)this[Me]=E;else{const Te=s.isBuffer(E)?E:s.from(E,Ce),De=Te.length;if(De===0)throw new TypeError('The value "'+E+'" is invalid for argument "value"');for(Me=0;Me<le-ae;++Me)this[Me+ae]=Te[Me%De]}return this};const ie={};function be(E,ae,le){ie[E]=class extends le{constructor(){super(),Object.defineProperty(this,"message",{value:ae.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${E}]`,delete this.name}get code(){return E}set code(Ce){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:Ce,writable:!0})}toString(){return`${this.name} [${E}]: ${this.message}`}}}be("ERR_BUFFER_OUT_OF_BOUNDS",function(E){return E?`${E} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),be("ERR_INVALID_ARG_TYPE",function(E,ae){return`The "${E}" argument must be of type number. Received type ${typeof ae}`},TypeError),be("ERR_OUT_OF_RANGE",function(E,ae,le){let Ce=`The value of "${E}" is out of range.`,Me=le;return Number.isInteger(le)&&Math.abs(le)>2**32?Me=X(String(le)):typeof le=="bigint"&&(Me=String(le),(le>BigInt(2)**BigInt(32)||le<-(BigInt(2)**BigInt(32)))&&(Me=X(Me)),Me+="n"),Ce+=` It must be ${ae}. Received ${Me}`,Ce},RangeError);function X(E){let ae="",le=E.length;const Ce=E[0]==="-"?1:0;for(;le>=Ce+4;le-=3)ae=`_${E.slice(le-3,le)}${ae}`;return`${E.slice(0,le)}${ae}`}function M(E,ae,le){oe(ae,"offset"),(E[ae]===void 0||E[ae+le]===void 0)&&G(ae,E.length-(le+1))}function $(E,ae,le,Ce,Me,Te){if(E>le||E<ae){const De=typeof ae=="bigint"?"n":"";let ra;throw ae===0||ae===BigInt(0)?ra=`>= 0${De} and < 2${De} ** ${(Te+1)*8}${De}`:ra=`>= -(2${De} ** ${(Te+1)*8-1}${De}) and < 2 ** ${(Te+1)*8-1}${De}`,new ie.ERR_OUT_OF_RANGE("value",ra,E)}M(Ce,Me,Te)}function oe(E,ae){if(typeof E!="number")throw new ie.ERR_INVALID_ARG_TYPE(ae,"number",E)}function G(E,ae,le){throw Math.floor(E)!==E?(oe(E,le),new ie.ERR_OUT_OF_RANGE("offset","an integer",E)):ae<0?new ie.ERR_BUFFER_OUT_OF_BOUNDS:new ie.ERR_OUT_OF_RANGE("offset",`>= 0 and <= ${ae}`,E)}const ce=/[^+/0-9A-Za-z-_]/g;function pe(E){if(E=E.split("=")[0],E=E.trim().replace(ce,""),E.length<2)return"";for(;E.length%4!==0;)E=E+"=";return E}function Q(E,ae){ae=ae||1/0;let le;const Ce=E.length;let Me=null;const Te=[];for(let De=0;De<Ce;++De){if(le=E.charCodeAt(De),le>55295&&le<57344){if(!Me){if(le>56319){(ae-=3)>-1&&Te.push(239,191,189);continue}else if(De+1===Ce){(ae-=3)>-1&&Te.push(239,191,189);continue}Me=le;continue}if(le<56320){(ae-=3)>-1&&Te.push(239,191,189),Me=le;continue}le=(Me-55296<<10|le-56320)+65536}else Me&&(ae-=3)>-1&&Te.push(239,191,189);if(Me=null,le<128){if((ae-=1)<0)break;Te.push(le)}else if(le<2048){if((ae-=2)<0)break;Te.push(le>>6|192,le&63|128)}else if(le<65536){if((ae-=3)<0)break;Te.push(le>>12|224,le>>6&63|128,le&63|128)}else if(le<1114112){if((ae-=4)<0)break;Te.push(le>>18|240,le>>12&63|128,le>>6&63|128,le&63|128)}else throw new Error("Invalid code point")}return Te}function re(E){const ae=[];for(let le=0;le<E.length;++le)ae.push(E.charCodeAt(le)&255);return ae}function de(E,ae){let le,Ce,Me;const Te=[];for(let De=0;De<E.length&&!((ae-=2)<0);++De)le=E.charCodeAt(De),Ce=le>>8,Me=le%256,Te.push(Me),Te.push(Ce);return Te}function fe(E){return a.toByteArray(pe(E))}function ge(E,ae,le,Ce){let Me;for(Me=0;Me<Ce&&!(Me+le>=ae.length||Me>=E.length);++Me)ae[Me+le]=E[Me];return Me}function he(E,ae){return E instanceof ae||E!=null&&E.constructor!=null&&E.constructor.name!=null&&E.constructor.name===ae.name}function xe(E){return E!==E}const Oe=(function(){const E="0123456789abcdef",ae=new Array(256);for(let le=0;le<16;++le){const Ce=le*16;for(let Me=0;Me<16;++Me)ae[Ce+Me]=E[le]+E[Me]}return ae})();function _e(E){return typeof BigInt>"u"?Ye:E}function Ye(){throw new Error("BigInt not supported")}})(Mte)),Mte}const _te=$F(jee);var m7,Lte;function Zaa(){if(Lte)return m7;Lte=1;function e(g,b){var y=Object.keys(g);if(Object.getOwnPropertySymbols){var v=Object.getOwnPropertySymbols(g);b&&(v=v.filter(function(k){return Object.getOwnPropertyDescriptor(g,k).enumerable})),y.push.apply(y,v)}return y}function a(g){for(var b=1;b<arguments.length;b++){var y=arguments[b]!=null?arguments[b]:{};b%2?e(Object(y),!0).forEach(function(v){t(g,v,y[v])}):Object.getOwnPropertyDescriptors?Object.defineProperties(g,Object.getOwnPropertyDescriptors(y)):e(Object(y)).forEach(function(v){Object.defineProperty(g,v,Object.getOwnPropertyDescriptor(y,v))})}return g}function t(g,b,y){return b=o(b),b in g?Object.defineProperty(g,b,{value:y,enumerable:!0,configurable:!0,writable:!0}):g[b]=y,g}function r(g,b){if(!(g instanceof b))throw new TypeError("Cannot call a class as a function")}function n(g,b){for(var y=0;y<b.length;y++){var v=b[y];v.enumerable=v.enumerable||!1,v.configurable=!0,"value"in v&&(v.writable=!0),Object.defineProperty(g,o(v.key),v)}}function i(g,b,y){return b&&n(g.prototype,b),Object.defineProperty(g,"prototype",{writable:!1}),g}function o(g){var b=s(g,"string");return typeof b=="symbol"?b:String(b)}function s(g,b){if(typeof g!="object"||g===null)return g;var y=g[Symbol.toPrimitive];if(y!==void 0){var v=y.call(g,b);if(typeof v!="object")return v;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(g)}var l=d1(),c=l.Buffer,u=_te,d=u.inspect,p=d&&d.custom||"inspect";function m(g,b,y){c.prototype.copy.call(g,b,y)}return m7=(function(){function g(){r(this,g),this.head=null,this.tail=null,this.length=0}return i(g,[{key:"push",value:function(b){var y={data:b,next:null};this.length>0?this.tail.next=y:this.head=y,this.tail=y,++this.length}},{key:"unshift",value:function(b){var y={data:b,next:this.head};this.length===0&&(this.tail=y),this.head=y,++this.length}},{key:"shift",value:function(){if(this.length!==0){var b=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,b}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(b){if(this.length===0)return"";for(var y=this.head,v=""+y.data;y=y.next;)v+=b+y.data;return v}},{key:"concat",value:function(b){if(this.length===0)return c.alloc(0);for(var y=c.allocUnsafe(b>>>0),v=this.head,k=0;v;)m(v.data,y,k),k+=v.data.length,v=v.next;return y}},{key:"consume",value:function(b,y){var v;return b<this.head.data.length?(v=this.head.data.slice(0,b),this.head.data=this.head.data.slice(b)):b===this.head.data.length?v=this.shift():v=y?this._getString(b):this._getBuffer(b),v}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(b){var y=this.head,v=1,k=y.data;for(b-=k.length;y=y.next;){var z=y.data,C=b>z.length?z.length:b;if(C===z.length?k+=z:k+=z.slice(0,b),b-=C,b===0){C===z.length?(++v,y.next?this.head=y.next:this.head=this.tail=null):(this.head=y,y.data=z.slice(C));break}++v}return this.length-=v,k}},{key:"_getBuffer",value:function(b){var y=c.allocUnsafe(b),v=this.head,k=1;for(v.data.copy(y),b-=v.data.length;v=v.next;){var z=v.data,C=b>z.length?z.length:b;if(z.copy(y,y.length-b,0,C),b-=C,b===0){C===z.length?(++k,v.next?this.head=v.next:this.head=this.tail=null):(this.head=v,v.data=z.slice(C));break}++k}return this.length-=k,y}},{key:p,value:function(b,y){return d(this,a(a({},y),{},{depth:0,customInspect:!1}))}}]),g})(),m7}var f7,Rte;function Nte(){if(Rte)return f7;Rte=1;function e(o,s){var l=this,c=this._readableState&&this._readableState.destroyed,u=this._writableState&&this._writableState.destroyed;return c||u?(s?s(o):o&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process.nextTick(n,this,o)):process.nextTick(n,this,o)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(o||null,function(d){!s&&d?l._writableState?l._writableState.errorEmitted?process.nextTick(t,l):(l._writableState.errorEmitted=!0,process.nextTick(a,l,d)):process.nextTick(a,l,d):s?(process.nextTick(t,l),s(d)):process.nextTick(t,l)}),this)}function a(o,s){n(o,s),t(o)}function t(o){o._writableState&&!o._writableState.emitClose||o._readableState&&!o._readableState.emitClose||o.emit("close")}function r(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function n(o,s){o.emit("error",s)}function i(o,s){var l=o._readableState,c=o._writableState;l&&l.autoDestroy||c&&c.autoDestroy?o.destroy(s):o.emit("error",s)}return f7={destroy:e,undestroy:r,errorOrDestroy:i},f7}var g7={},Dte;function ev(){if(Dte)return g7;Dte=1;function e(s,l){s.prototype=Object.create(l.prototype),s.prototype.constructor=s,s.__proto__=l}var a={};function t(s,l,c){c||(c=Error);function u(p,m,g){return typeof l=="string"?l:l(p,m,g)}var d=(function(p){e(m,p);function m(g,b,y){return p.call(this,u(g,b,y))||this}return m})(c);d.prototype.name=c.name,d.prototype.code=s,a[s]=d}function r(s,l){if(Array.isArray(s)){var c=s.length;return s=s.map(function(u){return String(u)}),c>2?"one of ".concat(l," ").concat(s.slice(0,c-1).join(", "),", or ")+s[c-1]:c===2?"one of ".concat(l," ").concat(s[0]," or ").concat(s[1]):"of ".concat(l," ").concat(s[0])}else return"of ".concat(l," ").concat(String(s))}function n(s,l,c){return s.substr(0,l.length)===l}function i(s,l,c){return(c===void 0||c>s.length)&&(c=s.length),s.substring(c-l.length,c)===l}function o(s,l,c){return typeof c!="number"&&(c=0),c+l.length>s.length?!1:s.indexOf(l,c)!==-1}return t("ERR_INVALID_OPT_VALUE",function(s,l){return'The value "'+l+'" is invalid for option "'+s+'"'},TypeError),t("ERR_INVALID_ARG_TYPE",function(s,l,c){var u;typeof l=="string"&&n(l,"not ")?(u="must not be",l=l.replace(/^not /,"")):u="must be";var d;if(i(s," argument"))d="The ".concat(s," ").concat(u," ").concat(r(l,"type"));else{var p=o(s,".")?"property":"argument";d='The "'.concat(s,'" ').concat(p," ").concat(u," ").concat(r(l,"type"))}return d+=". Received type ".concat(typeof c),d},TypeError),t("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),t("ERR_METHOD_NOT_IMPLEMENTED",function(s){return"The "+s+" method is not implemented"}),t("ERR_STREAM_PREMATURE_CLOSE","Premature close"),t("ERR_STREAM_DESTROYED",function(s){return"Cannot call "+s+" after a stream was destroyed"}),t("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),t("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),t("ERR_STREAM_WRITE_AFTER_END","write after end"),t("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),t("ERR_UNKNOWN_ENCODING",function(s){return"Unknown encoding: "+s},TypeError),t("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),g7.codes=a,g7}var v7,$te;function Ite(){if($te)return v7;$te=1;var e=ev().codes.ERR_INVALID_OPT_VALUE;function a(r,n,i){return r.highWaterMark!=null?r.highWaterMark:n?r[i]:null}function t(r,n,i,o){var s=a(n,o,i);if(s!=null){if(!(isFinite(s)&&Math.floor(s)===s)||s<0){var l=o?i:"highWaterMark";throw new e(l,s)}return Math.floor(s)}return r.objectMode?16:16*1024}return v7={getHighWaterMark:t},v7}var b7,Kte;function Qaa(){if(Kte)return b7;Kte=1,b7=e;function e(t,r){if(a("noDeprecation"))return t;var n=!1;function i(){if(!n){if(a("throwDeprecation"))throw new Error(r);a("traceDeprecation")?console.trace(r):console.warn(r),n=!0}return t.apply(this,arguments)}return i}function a(t){try{if(!globalThis.localStorage)return!1}catch{return!1}var r=globalThis.localStorage[t];return r==null?!1:String(r).toLowerCase()==="true"}return b7}var y7,Vte;function Hte(){if(Vte)return y7;Vte=1,y7=A;function e(F){var ee=this;this.next=null,this.entry=null,this.finish=function(){_(ee,F)}}var a;A.WritableState=S;var t={deprecate:Qaa()},r=Pte(),n=d1().Buffer,i=(typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function o(F){return n.from(F)}function s(F){return n.isBuffer(F)||F instanceof i}var l=Nte(),c=Ite(),u=c.getHighWaterMark,d=ev().codes,p=d.ERR_INVALID_ARG_TYPE,m=d.ERR_METHOD_NOT_IMPLEMENTED,g=d.ERR_MULTIPLE_CALLBACK,b=d.ERR_STREAM_CANNOT_PIPE,y=d.ERR_STREAM_DESTROYED,v=d.ERR_STREAM_NULL_VALUES,k=d.ERR_STREAM_WRITE_AFTER_END,z=d.ERR_UNKNOWN_ENCODING,C=l.errorOrDestroy;function w(){}function S(F,ee,ie){a=a||av(),F=F||{},typeof ie!="boolean"&&(ie=ee instanceof a),this.objectMode=!!F.objectMode,ie&&(this.objectMode=this.objectMode||!!F.writableObjectMode),this.highWaterMark=u(this,F,"writableHighWaterMark",ie),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var be=F.decodeStrings===!1;this.decodeStrings=!be,this.defaultEncoding=F.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(X){te(ee,X)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=F.emitClose!==!1,this.autoDestroy=!!F.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new e(this)}S.prototype.getBuffer=function(){for(var F=this.bufferedRequest,ee=[];F;)ee.push(F),F=F.next;return ee},(function(){try{Object.defineProperty(S.prototype,"buffer",{get:t.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}})();var O;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(O=Function.prototype[Symbol.hasInstance],Object.defineProperty(A,Symbol.hasInstance,{value:function(F){return O.call(this,F)?!0:this!==A?!1:F&&F._writableState instanceof S}})):O=function(F){return F instanceof this};function A(F){a=a||av();var ee=this instanceof a;if(!ee&&!O.call(A,this))return new A(F);this._writableState=new S(F,this,ee),this.writable=!0,F&&(typeof F.write=="function"&&(this._write=F.write),typeof F.writev=="function"&&(this._writev=F.writev),typeof F.destroy=="function"&&(this._destroy=F.destroy),typeof F.final=="function"&&(this._final=F.final)),r.call(this)}A.prototype.pipe=function(){C(this,new b)};function B(F,ee){var ie=new k;C(F,ie),process.nextTick(ee,ie)}function L(F,ee,ie,be){var X;return ie===null?X=new v:typeof ie!="string"&&!ee.objectMode&&(X=new p("chunk",["string","Buffer"],ie)),X?(C(F,X),process.nextTick(be,X),!1):!0}A.prototype.write=function(F,ee,ie){var be=this._writableState,X=!1,M=!be.objectMode&&s(F);return M&&!n.isBuffer(F)&&(F=o(F)),typeof ee=="function"&&(ie=ee,ee=null),M?ee="buffer":ee||(ee=be.defaultEncoding),typeof ie!="function"&&(ie=w),be.ending?B(this,ie):(M||L(this,be,F,ie))&&(be.pendingcb++,X=N(this,be,M,F,ee,ie)),X},A.prototype.cork=function(){this._writableState.corked++},A.prototype.uncork=function(){var F=this._writableState;F.corked&&(F.corked--,!F.writing&&!F.corked&&!F.bufferProcessing&&F.bufferedRequest&&me(this,F))},A.prototype.setDefaultEncoding=function(F){if(typeof F=="string"&&(F=F.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((F+"").toLowerCase())>-1))throw new z(F);return this._writableState.defaultEncoding=F,this},Object.defineProperty(A.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function q(F,ee,ie){return!F.objectMode&&F.decodeStrings!==!1&&typeof ee=="string"&&(ee=n.from(ee,ie)),ee}Object.defineProperty(A.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function N(F,ee,ie,be,X,M){if(!ie){var $=q(ee,be,X);be!==$&&(ie=!0,X="buffer",be=$)}var oe=ee.objectMode?1:be.length;ee.length+=oe;var G=ee.length<ee.highWaterMark;if(G||(ee.needDrain=!0),ee.writing||ee.corked){var ce=ee.lastBufferedRequest;ee.lastBufferedRequest={chunk:be,encoding:X,isBuf:ie,callback:M,next:null},ce?ce.next=ee.lastBufferedRequest:ee.bufferedRequest=ee.lastBufferedRequest,ee.bufferedRequestCount+=1}else U(F,ee,!1,oe,be,X,M);return G}function U(F,ee,ie,be,X,M,$){ee.writelen=be,ee.writecb=$,ee.writing=!0,ee.sync=!0,ee.destroyed?ee.onwrite(new y("write")):ie?F._writev(X,ee.onwrite):F._write(X,M,ee.onwrite),ee.sync=!1}function D(F,ee,ie,be,X){--ee.pendingcb,ie?(process.nextTick(X,be),process.nextTick(V,F,ee),F._writableState.errorEmitted=!0,C(F,be)):(X(be),F._writableState.errorEmitted=!0,C(F,be),V(F,ee))}function Y(F){F.writing=!1,F.writecb=null,F.length-=F.writelen,F.writelen=0}function te(F,ee){var ie=F._writableState,be=ie.sync,X=ie.writecb;if(typeof X!="function")throw new g;if(Y(ie),ee)D(F,ie,be,ee,X);else{var M=I(ie)||F.destroyed;!M&&!ie.corked&&!ie.bufferProcessing&&ie.bufferedRequest&&me(F,ie),be?process.nextTick(ue,F,ie,M,X):ue(F,ie,M,X)}}function ue(F,ee,ie,be){ie||ne(F,ee),ee.pendingcb--,be(),V(F,ee)}function ne(F,ee){ee.length===0&&ee.needDrain&&(ee.needDrain=!1,F.emit("drain"))}function me(F,ee){ee.bufferProcessing=!0;var ie=ee.bufferedRequest;if(F._writev&&ie&&ie.next){var be=ee.bufferedRequestCount,X=new Array(be),M=ee.corkedRequestsFree;M.entry=ie;for(var $=0,oe=!0;ie;)X[$]=ie,ie.isBuf||(oe=!1),ie=ie.next,$+=1;X.allBuffers=oe,U(F,ee,!0,ee.length,X,"",M.finish),ee.pendingcb++,ee.lastBufferedRequest=null,M.next?(ee.corkedRequestsFree=M.next,M.next=null):ee.corkedRequestsFree=new e(ee),ee.bufferedRequestCount=0}else{for(;ie;){var G=ie.chunk,ce=ie.encoding,pe=ie.callback,Q=ee.objectMode?1:G.length;if(U(F,ee,!1,Q,G,ce,pe),ie=ie.next,ee.bufferedRequestCount--,ee.writing)break}ie===null&&(ee.lastBufferedRequest=null)}ee.bufferedRequest=ie,ee.bufferProcessing=!1}A.prototype._write=function(F,ee,ie){ie(new m("_write()"))},A.prototype._writev=null,A.prototype.end=function(F,ee,ie){var be=this._writableState;return typeof F=="function"?(ie=F,F=null,ee=null):typeof ee=="function"&&(ie=ee,ee=null),F!=null&&this.write(F,ee),be.corked&&(be.corked=1,this.uncork()),be.ending||P(this,be,ie),this},Object.defineProperty(A.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function I(F){return F.ending&&F.length===0&&F.bufferedRequest===null&&!F.finished&&!F.writing}function K(F,ee){F._final(function(ie){ee.pendingcb--,ie&&C(F,ie),ee.prefinished=!0,F.emit("prefinish"),V(F,ee)})}function W(F,ee){!ee.prefinished&&!ee.finalCalled&&(typeof F._final=="function"&&!ee.destroyed?(ee.pendingcb++,ee.finalCalled=!0,process.nextTick(K,F,ee)):(ee.prefinished=!0,F.emit("prefinish")))}function V(F,ee){var ie=I(ee);if(ie&&(W(F,ee),ee.pendingcb===0&&(ee.finished=!0,F.emit("finish"),ee.autoDestroy))){var be=F._readableState;(!be||be.autoDestroy&&be.endEmitted)&&F.destroy()}return ie}function P(F,ee,ie){ee.ending=!0,V(F,ee),ie&&(ee.finished?process.nextTick(ie):F.once("finish",ie)),ee.ended=!0,F.writable=!1}function _(F,ee,ie){var be=F.entry;for(F.entry=null;be;){var X=be.callback;ee.pendingcb--,X(ie),be=be.next}ee.corkedRequestsFree.next=F}return Object.defineProperty(A.prototype,"destroyed",{enumerable:!1,get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(F){this._writableState&&(this._writableState.destroyed=F)}}),A.prototype.destroy=l.destroy,A.prototype._undestroy=l.undestroy,A.prototype._destroy=function(F,ee){ee(F)},y7}var k7,Fte;function av(){if(Fte)return k7;Fte=1;var e=Object.keys||function(c){var u=[];for(var d in c)u.push(d);return u};k7=o;for(var a=Yte(),t=Hte(),r=e(t.prototype),n=0;n<r.length;n++){var i=r[n];o.prototype[i]||(o.prototype[i]=t.prototype[i])}function o(c){if(!(this instanceof o))return new o(c);a.call(this,c),t.call(this,c),this.allowHalfOpen=!0,c&&(c.readable===!1&&(this.readable=!1),c.writable===!1&&(this.writable=!1),c.allowHalfOpen===!1&&(this.allowHalfOpen=!1,this.once("end",s)))}Object.defineProperty(o.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(o.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(o.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function s(){this._writableState.ended||process.nextTick(l,this)}function l(c){c.end()}return Object.defineProperty(o.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(c){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=c,this._writableState.destroyed=c)}}),k7}var x7={},w7={exports:{}};/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */var Gte;function Xaa(){return Gte||(Gte=1,(function(e,a){var t=d1(),r=t.Buffer;function n(o,s){for(var l in o)s[l]=o[l]}r.from&&r.alloc&&r.allocUnsafe&&r.allocUnsafeSlow?e.exports=t:(n(t,a),a.Buffer=i);function i(o,s,l){return r(o,s,l)}i.prototype=Object.create(r.prototype),n(r,i),i.from=function(o,s,l){if(typeof o=="number")throw new TypeError("Argument must not be a number");return r(o,s,l)},i.alloc=function(o,s,l){if(typeof o!="number")throw new TypeError("Argument must be a number");var c=r(o);return s!==void 0?typeof l=="string"?c.fill(s,l):c.fill(s):c.fill(0),c},i.allocUnsafe=function(o){if(typeof o!="number")throw new TypeError("Argument must be a number");return r(o)},i.allocUnsafeSlow=function(o){if(typeof o!="number")throw new TypeError("Argument must be a number");return t.SlowBuffer(o)}})(w7,w7.exports)),w7.exports}var qte;function Jte(){if(qte)return x7;qte=1;var e=Xaa().Buffer,a=e.isEncoding||function(v){switch(v=""+v,v&&v.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function t(v){if(!v)return"utf8";for(var k;;)switch(v){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return v;default:if(k)return;v=(""+v).toLowerCase(),k=!0}}function r(v){var k=t(v);if(typeof k!="string"&&(e.isEncoding===a||!a(v)))throw new Error("Unknown encoding: "+v);return k||v}x7.StringDecoder=n;function n(v){this.encoding=r(v);var k;switch(this.encoding){case"utf16le":this.text=d,this.end=p,k=4;break;case"utf8":this.fillLast=l,k=4;break;case"base64":this.text=m,this.end=g,k=3;break;default:this.write=b,this.end=y;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=e.allocUnsafe(k)}n.prototype.write=function(v){if(v.length===0)return"";var k,z;if(this.lastNeed){if(k=this.fillLast(v),k===void 0)return"";z=this.lastNeed,this.lastNeed=0}else z=0;return z<v.length?k?k+this.text(v,z):this.text(v,z):k||""},n.prototype.end=u,n.prototype.text=c,n.prototype.fillLast=function(v){if(this.lastNeed<=v.length)return v.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);v.copy(this.lastChar,this.lastTotal-this.lastNeed,0,v.length),this.lastNeed-=v.length};function i(v){return v<=127?0:v>>5===6?2:v>>4===14?3:v>>3===30?4:v>>6===2?-1:-2}function o(v,k,z){var C=k.length-1;if(C<z)return 0;var w=i(k[C]);return w>=0?(w>0&&(v.lastNeed=w-1),w):--C<z||w===-2?0:(w=i(k[C]),w>=0?(w>0&&(v.lastNeed=w-2),w):--C<z||w===-2?0:(w=i(k[C]),w>=0?(w>0&&(w===2?w=0:v.lastNeed=w-3),w):0))}function s(v,k,z){if((k[0]&192)!==128)return v.lastNeed=0,"\uFFFD";if(v.lastNeed>1&&k.length>1){if((k[1]&192)!==128)return v.lastNeed=1,"\uFFFD";if(v.lastNeed>2&&k.length>2&&(k[2]&192)!==128)return v.lastNeed=2,"\uFFFD"}}function l(v){var k=this.lastTotal-this.lastNeed,z=s(this,v);if(z!==void 0)return z;if(this.lastNeed<=v.length)return v.copy(this.lastChar,k,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);v.copy(this.lastChar,k,0,v.length),this.lastNeed-=v.length}function c(v,k){var z=o(this,v,k);if(!this.lastNeed)return v.toString("utf8",k);this.lastTotal=z;var C=v.length-(z-this.lastNeed);return v.copy(this.lastChar,0,C),v.toString("utf8",k,C)}function u(v){var k=v&&v.length?this.write(v):"";return this.lastNeed?k+"\uFFFD":k}function d(v,k){if((v.length-k)%2===0){var z=v.toString("utf16le",k);if(z){var C=z.charCodeAt(z.length-1);if(C>=55296&&C<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=v[v.length-2],this.lastChar[1]=v[v.length-1],z.slice(0,-1)}return z}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=v[v.length-1],v.toString("utf16le",k,v.length-1)}function p(v){var k=v&&v.length?this.write(v):"";if(this.lastNeed){var z=this.lastTotal-this.lastNeed;return k+this.lastChar.toString("utf16le",0,z)}return k}function m(v,k){var z=(v.length-k)%3;return z===0?v.toString("base64",k):(this.lastNeed=3-z,this.lastTotal=3,z===1?this.lastChar[0]=v[v.length-1]:(this.lastChar[0]=v[v.length-2],this.lastChar[1]=v[v.length-1]),v.toString("base64",k,v.length-z))}function g(v){var k=v&&v.length?this.write(v):"";return this.lastNeed?k+this.lastChar.toString("base64",0,3-this.lastNeed):k}function b(v){return v.toString(this.encoding)}function y(v){return v&&v.length?this.write(v):""}return x7}var z7,Ute;function S7(){if(Ute)return z7;Ute=1;var e=ev().codes.ERR_STREAM_PREMATURE_CLOSE;function a(i){var o=!1;return function(){if(!o){o=!0;for(var s=arguments.length,l=new Array(s),c=0;c<s;c++)l[c]=arguments[c];i.apply(this,l)}}}function t(){}function r(i){return i.setHeader&&typeof i.abort=="function"}function n(i,o,s){if(typeof o=="function")return n(i,null,o);o||(o={}),s=a(s||t);var l=o.readable||o.readable!==!1&&i.readable,c=o.writable||o.writable!==!1&&i.writable,u=function(){i.writable||p()},d=i._writableState&&i._writableState.finished,p=function(){c=!1,d=!0,l||s.call(i)},m=i._readableState&&i._readableState.endEmitted,g=function(){l=!1,m=!0,c||s.call(i)},b=function(k){s.call(i,k)},y=function(){var k;if(l&&!m)return(!i._readableState||!i._readableState.ended)&&(k=new e),s.call(i,k);if(c&&!d)return(!i._writableState||!i._writableState.ended)&&(k=new e),s.call(i,k)},v=function(){i.req.on("finish",p)};return r(i)?(i.on("complete",p),i.on("abort",y),i.req?v():i.on("request",v)):c&&!i._writableState&&(i.on("end",u),i.on("close",u)),i.on("end",g),i.on("finish",p),o.error!==!1&&i.on("error",b),i.on("close",y),function(){i.removeListener("complete",p),i.removeListener("abort",y),i.removeListener("request",v),i.req&&i.req.removeListener("finish",p),i.removeListener("end",u),i.removeListener("close",u),i.removeListener("finish",p),i.removeListener("end",g),i.removeListener("error",b),i.removeListener("close",y)}}return z7=n,z7}var C7,Wte;function Yaa(){if(Wte)return C7;Wte=1;var e;function a(z,C,w){return C=t(C),C in z?Object.defineProperty(z,C,{value:w,enumerable:!0,configurable:!0,writable:!0}):z[C]=w,z}function t(z){var C=r(z,"string");return typeof C=="symbol"?C:String(C)}function r(z,C){if(typeof z!="object"||z===null)return z;var w=z[Symbol.toPrimitive];if(w!==void 0){var S=w.call(z,C);if(typeof S!="object")return S;throw new TypeError("@@toPrimitive must return a primitive value.")}return(C==="string"?String:Number)(z)}var n=S7(),i=Symbol("lastResolve"),o=Symbol("lastReject"),s=Symbol("error"),l=Symbol("ended"),c=Symbol("lastPromise"),u=Symbol("handlePromise"),d=Symbol("stream");function p(z,C){return{value:z,done:C}}function m(z){var C=z[i];if(C!==null){var w=z[d].read();w!==null&&(z[c]=null,z[i]=null,z[o]=null,C(p(w,!1)))}}function g(z){process.nextTick(m,z)}function b(z,C){return function(w,S){z.then(function(){if(C[l]){w(p(void 0,!0));return}C[u](w,S)},S)}}var y=Object.getPrototypeOf(function(){}),v=Object.setPrototypeOf((e={get stream(){return this[d]},next:function(){var z=this,C=this[s];if(C!==null)return Promise.reject(C);if(this[l])return Promise.resolve(p(void 0,!0));if(this[d].destroyed)return new Promise(function(A,B){process.nextTick(function(){z[s]?B(z[s]):A(p(void 0,!0))})});var w=this[c],S;if(w)S=new Promise(b(w,this));else{var O=this[d].read();if(O!==null)return Promise.resolve(p(O,!1));S=new Promise(this[u])}return this[c]=S,S}},a(e,Symbol.asyncIterator,function(){return this}),a(e,"return",function(){var z=this;return new Promise(function(C,w){z[d].destroy(null,function(S){if(S){w(S);return}C(p(void 0,!0))})})}),e),y),k=function(z){var C,w=Object.create(v,(C={},a(C,d,{value:z,writable:!0}),a(C,i,{value:null,writable:!0}),a(C,o,{value:null,writable:!0}),a(C,s,{value:null,writable:!0}),a(C,l,{value:z._readableState.endEmitted,writable:!0}),a(C,u,{value:function(S,O){var A=w[d].read();A?(w[c]=null,w[i]=null,w[o]=null,S(p(A,!1))):(w[i]=S,w[o]=O)},writable:!0}),C));return w[c]=null,n(z,function(S){if(S&&S.code!=="ERR_STREAM_PREMATURE_CLOSE"){var O=w[o];O!==null&&(w[c]=null,w[i]=null,w[o]=null,O(S)),w[s]=S;return}var A=w[i];A!==null&&(w[c]=null,w[i]=null,w[o]=null,A(p(void 0,!0))),w[l]=!0}),z.on("readable",g.bind(null,w)),w};return C7=k,C7}var Zte,Qte;function eta(){return Qte||(Qte=1,Zte=function(){throw new Error("Readable.from is not available in the browser")}),Zte}var j7,Xte;function Yte(){if(Xte)return j7;Xte=1,j7=B;var e;B.ReadableState=A;var a=function(M,$){return M.listeners($).length},t=Pte(),r=d1().Buffer,n=(typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function i(M){return r.from(M)}function o(M){return r.isBuffer(M)||M instanceof n}var s=_te,l;s&&s.debuglog?l=s.debuglog("stream"):l=function(){};var c=Zaa(),u=Nte(),d=Ite(),p=d.getHighWaterMark,m=ev().codes,g=m.ERR_INVALID_ARG_TYPE,b=m.ERR_STREAM_PUSH_AFTER_EOF,y=m.ERR_METHOD_NOT_IMPLEMENTED,v=m.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,k,z,C,w=u.errorOrDestroy,S=["error","close","destroy","pause","resume"];function O(M,$,oe){if(typeof M.prependListener=="function")return M.prependListener($,oe);!M._events||!M._events[$]?M.on($,oe):Array.isArray(M._events[$])?M._events[$].unshift(oe):M._events[$]=[oe,M._events[$]]}function A(M,$,oe){e=e||av(),M=M||{},typeof oe!="boolean"&&(oe=$ instanceof e),this.objectMode=!!M.objectMode,oe&&(this.objectMode=this.objectMode||!!M.readableObjectMode),this.highWaterMark=p(this,M,"readableHighWaterMark",oe),this.buffer=new c,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=M.emitClose!==!1,this.autoDestroy=!!M.autoDestroy,this.destroyed=!1,this.defaultEncoding=M.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,M.encoding&&(k||(k=Jte().StringDecoder),this.decoder=new k(M.encoding),this.encoding=M.encoding)}function B(M){if(e=e||av(),!(this instanceof B))return new B(M);var $=this instanceof e;this._readableState=new A(M,this,$),this.readable=!0,M&&(typeof M.read=="function"&&(this._read=M.read),typeof M.destroy=="function"&&(this._destroy=M.destroy)),t.call(this)}Object.defineProperty(B.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(M){this._readableState&&(this._readableState.destroyed=M)}}),B.prototype.destroy=u.destroy,B.prototype._undestroy=u.undestroy,B.prototype._destroy=function(M,$){$(M)},B.prototype.push=function(M,$){var oe=this._readableState,G;return oe.objectMode?G=!0:typeof M=="string"&&($=$||oe.defaultEncoding,$!==oe.encoding&&(M=r.from(M,$),$=""),G=!0),L(this,M,$,!1,G)},B.prototype.unshift=function(M){return L(this,M,null,!0,!1)};function L(M,$,oe,G,ce){l("readableAddChunk",$);var pe=M._readableState;if($===null)pe.reading=!1,te(M,pe);else{var Q;if(ce||(Q=N(pe,$)),Q)w(M,Q);else if(pe.objectMode||$&&$.length>0)if(typeof $!="string"&&!pe.objectMode&&Object.getPrototypeOf($)!==r.prototype&&($=i($)),G)pe.endEmitted?w(M,new v):q(M,pe,$,!0);else if(pe.ended)w(M,new b);else{if(pe.destroyed)return!1;pe.reading=!1,pe.decoder&&!oe?($=pe.decoder.write($),pe.objectMode||$.length!==0?q(M,pe,$,!1):me(M,pe)):q(M,pe,$,!1)}else G||(pe.reading=!1,me(M,pe))}return!pe.ended&&(pe.length<pe.highWaterMark||pe.length===0)}function q(M,$,oe,G){$.flowing&&$.length===0&&!$.sync?($.awaitDrain=0,M.emit("data",oe)):($.length+=$.objectMode?1:oe.length,G?$.buffer.unshift(oe):$.buffer.push(oe),$.needReadable&&ue(M)),me(M,$)}function N(M,$){var oe;return!o($)&&typeof $!="string"&&$!==void 0&&!M.objectMode&&(oe=new g("chunk",["string","Buffer","Uint8Array"],$)),oe}B.prototype.isPaused=function(){return this._readableState.flowing===!1},B.prototype.setEncoding=function(M){k||(k=Jte().StringDecoder);var $=new k(M);this._readableState.decoder=$,this._readableState.encoding=this._readableState.decoder.encoding;for(var oe=this._readableState.buffer.head,G="";oe!==null;)G+=$.write(oe.data),oe=oe.next;return this._readableState.buffer.clear(),G!==""&&this._readableState.buffer.push(G),this._readableState.length=G.length,this};var U=1073741824;function D(M){return M>=U?M=U:(M--,M|=M>>>1,M|=M>>>2,M|=M>>>4,M|=M>>>8,M|=M>>>16,M++),M}function Y(M,$){return M<=0||$.length===0&&$.ended?0:$.objectMode?1:M!==M?$.flowing&&$.length?$.buffer.head.data.length:$.length:(M>$.highWaterMark&&($.highWaterMark=D(M)),M<=$.length?M:$.ended?$.length:($.needReadable=!0,0))}B.prototype.read=function(M){l("read",M),M=parseInt(M,10);var $=this._readableState,oe=M;if(M!==0&&($.emittedReadable=!1),M===0&&$.needReadable&&(($.highWaterMark!==0?$.length>=$.highWaterMark:$.length>0)||$.ended))return l("read: emitReadable",$.length,$.ended),$.length===0&&$.ended?ie(this):ue(this),null;if(M=Y(M,$),M===0&&$.ended)return $.length===0&&ie(this),null;var G=$.needReadable;l("need readable",G),($.length===0||$.length-M<$.highWaterMark)&&(G=!0,l("length less than watermark",G)),$.ended||$.reading?(G=!1,l("reading or ended",G)):G&&(l("do read"),$.reading=!0,$.sync=!0,$.length===0&&($.needReadable=!0),this._read($.highWaterMark),$.sync=!1,$.reading||(M=Y(oe,$)));var ce;return M>0?ce=ee(M,$):ce=null,ce===null?($.needReadable=$.length<=$.highWaterMark,M=0):($.length-=M,$.awaitDrain=0),$.length===0&&($.ended||($.needReadable=!0),oe!==M&&$.ended&&ie(this)),ce!==null&&this.emit("data",ce),ce};function te(M,$){if(l("onEofChunk"),!$.ended){if($.decoder){var oe=$.decoder.end();oe&&oe.length&&($.buffer.push(oe),$.length+=$.objectMode?1:oe.length)}$.ended=!0,$.sync?ue(M):($.needReadable=!1,$.emittedReadable||($.emittedReadable=!0,ne(M)))}}function ue(M){var $=M._readableState;l("emitReadable",$.needReadable,$.emittedReadable),$.needReadable=!1,$.emittedReadable||(l("emitReadable",$.flowing),$.emittedReadable=!0,process.nextTick(ne,M))}function ne(M){var $=M._readableState;l("emitReadable_",$.destroyed,$.length,$.ended),!$.destroyed&&($.length||$.ended)&&(M.emit("readable"),$.emittedReadable=!1),$.needReadable=!$.flowing&&!$.ended&&$.length<=$.highWaterMark,F(M)}function me(M,$){$.readingMore||($.readingMore=!0,process.nextTick(I,M,$))}function I(M,$){for(;!$.reading&&!$.ended&&($.length<$.highWaterMark||$.flowing&&$.length===0);){var oe=$.length;if(l("maybeReadMore read 0"),M.read(0),oe===$.length)break}$.readingMore=!1}B.prototype._read=function(M){w(this,new y("_read()"))},B.prototype.pipe=function(M,$){var oe=this,G=this._readableState;switch(G.pipesCount){case 0:G.pipes=M;break;case 1:G.pipes=[G.pipes,M];break;default:G.pipes.push(M);break}G.pipesCount+=1,l("pipe count=%d opts=%j",G.pipesCount,$);var ce=(!$||$.end!==!1)&&M!==null&&M!==process.stderr,pe=ce?re:Ye;G.endEmitted?process.nextTick(pe):oe.once("end",pe),M.on("unpipe",Q);function Q(E,ae){l("onunpipe"),E===oe&&ae&&ae.hasUnpiped===!1&&(ae.hasUnpiped=!0,ge())}function re(){l("onend"),M.end()}var de=K(oe);M.on("drain",de);var fe=!1;function ge(){l("cleanup"),M.removeListener("close",Oe),M.removeListener("finish",_e),M.removeListener("drain",de),M.removeListener("error",xe),M.removeListener("unpipe",Q),oe.removeListener("end",re),oe.removeListener("end",Ye),oe.removeListener("data",he),fe=!0,G.awaitDrain&&(!M._writableState||M._writableState.needDrain)&&de()}oe.on("data",he);function he(E){l("ondata");var ae=M.write(E);l("dest.write",ae),ae===!1&&((G.pipesCount===1&&G.pipes===M||G.pipesCount>1&&X(G.pipes,M)!==-1)&&!fe&&(l("false write response, pause",G.awaitDrain),G.awaitDrain++),oe.pause())}function xe(E){l("onerror",E),Ye(),M.removeListener("error",xe),a(M,"error")===0&&w(M,E)}O(M,"error",xe);function Oe(){M.removeListener("finish",_e),Ye()}M.once("close",Oe);function _e(){l("onfinish"),M.removeListener("close",Oe),Ye()}M.once("finish",_e);function Ye(){l("unpipe"),oe.unpipe(M)}return M.emit("pipe",oe),G.flowing||(l("pipe resume"),oe.resume()),M};function K(M){return function(){var $=M._readableState;l("pipeOnDrain",$.awaitDrain),$.awaitDrain&&$.awaitDrain--,$.awaitDrain===0&&a(M,"data")&&($.flowing=!0,F(M))}}B.prototype.unpipe=function(M){var $=this._readableState,oe={hasUnpiped:!1};if($.pipesCount===0)return this;if($.pipesCount===1)return M&&M!==$.pipes?this:(M||(M=$.pipes),$.pipes=null,$.pipesCount=0,$.flowing=!1,M&&M.emit("unpipe",this,oe),this);if(!M){var G=$.pipes,ce=$.pipesCount;$.pipes=null,$.pipesCount=0,$.flowing=!1;for(var pe=0;pe<ce;pe++)G[pe].emit("unpipe",this,{hasUnpiped:!1});return this}var Q=X($.pipes,M);return Q===-1?this:($.pipes.splice(Q,1),$.pipesCount-=1,$.pipesCount===1&&($.pipes=$.pipes[0]),M.emit("unpipe",this,oe),this)},B.prototype.on=function(M,$){var oe=t.prototype.on.call(this,M,$),G=this._readableState;return M==="data"?(G.readableListening=this.listenerCount("readable")>0,G.flowing!==!1&&this.resume()):M==="readable"&&!G.endEmitted&&!G.readableListening&&(G.readableListening=G.needReadable=!0,G.flowing=!1,G.emittedReadable=!1,l("on readable",G.length,G.reading),G.length?ue(this):G.reading||process.nextTick(V,this)),oe},B.prototype.addListener=B.prototype.on,B.prototype.removeListener=function(M,$){var oe=t.prototype.removeListener.call(this,M,$);return M==="readable"&&process.nextTick(W,this),oe},B.prototype.removeAllListeners=function(M){var $=t.prototype.removeAllListeners.apply(this,arguments);return(M==="readable"||M===void 0)&&process.nextTick(W,this),$};function W(M){var $=M._readableState;$.readableListening=M.listenerCount("readable")>0,$.resumeScheduled&&!$.paused?$.flowing=!0:M.listenerCount("data")>0&&M.resume()}function V(M){l("readable nexttick read 0"),M.read(0)}B.prototype.resume=function(){var M=this._readableState;return M.flowing||(l("resume"),M.flowing=!M.readableListening,P(this,M)),M.paused=!1,this};function P(M,$){$.resumeScheduled||($.resumeScheduled=!0,process.nextTick(_,M,$))}function _(M,$){l("resume",$.reading),$.reading||M.read(0),$.resumeScheduled=!1,M.emit("resume"),F(M),$.flowing&&!$.reading&&M.read(0)}B.prototype.pause=function(){return l("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(l("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function F(M){var $=M._readableState;for(l("flow",$.flowing);$.flowing&&M.read()!==null;);}B.prototype.wrap=function(M){var $=this,oe=this._readableState,G=!1;M.on("end",function(){if(l("wrapped end"),oe.decoder&&!oe.ended){var Q=oe.decoder.end();Q&&Q.length&&$.push(Q)}$.push(null)}),M.on("data",function(Q){if(l("wrapped data"),oe.decoder&&(Q=oe.decoder.write(Q)),!(oe.objectMode&&Q==null)&&!(!oe.objectMode&&(!Q||!Q.length))){var re=$.push(Q);re||(G=!0,M.pause())}});for(var ce in M)this[ce]===void 0&&typeof M[ce]=="function"&&(this[ce]=(function(Q){return function(){return M[Q].apply(M,arguments)}})(ce));for(var pe=0;pe<S.length;pe++)M.on(S[pe],this.emit.bind(this,S[pe]));return this._read=function(Q){l("wrapped _read",Q),G&&(G=!1,M.resume())},this},typeof Symbol=="function"&&(B.prototype[Symbol.asyncIterator]=function(){return z===void 0&&(z=Yaa()),z(this)}),Object.defineProperty(B.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(B.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(B.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(M){this._readableState&&(this._readableState.flowing=M)}}),B._fromList=ee,Object.defineProperty(B.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}});function ee(M,$){if($.length===0)return null;var oe;return $.objectMode?oe=$.buffer.shift():!M||M>=$.length?($.decoder?oe=$.buffer.join(""):$.buffer.length===1?oe=$.buffer.first():oe=$.buffer.concat($.length),$.buffer.clear()):oe=$.buffer.consume(M,$.decoder),oe}function ie(M){var $=M._readableState;l("endReadable",$.endEmitted),$.endEmitted||($.ended=!0,process.nextTick(be,$,M))}function be(M,$){if(l("endReadableNT",M.endEmitted,M.length),!M.endEmitted&&M.length===0&&(M.endEmitted=!0,$.readable=!1,$.emit("end"),M.autoDestroy)){var oe=$._writableState;(!oe||oe.autoDestroy&&oe.finished)&&$.destroy()}}typeof Symbol=="function"&&(B.from=function(M,$){return C===void 0&&(C=eta()),C(B,M,$)});function X(M,$){for(var oe=0,G=M.length;oe<G;oe++)if(M[oe]===$)return oe;return-1}return j7}var O7,ere;function are(){if(ere)return O7;ere=1,O7=s;var e=ev().codes,a=e.ERR_METHOD_NOT_IMPLEMENTED,t=e.ERR_MULTIPLE_CALLBACK,r=e.ERR_TRANSFORM_ALREADY_TRANSFORMING,n=e.ERR_TRANSFORM_WITH_LENGTH_0,i=av();function o(u,d){var p=this._transformState;p.transforming=!1;var m=p.writecb;if(m===null)return this.emit("error",new t);p.writechunk=null,p.writecb=null,d!=null&&this.push(d),m(u);var g=this._readableState;g.reading=!1,(g.needReadable||g.length<g.highWaterMark)&&this._read(g.highWaterMark)}function s(u){if(!(this instanceof s))return new s(u);i.call(this,u),this._transformState={afterTransform:o.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,u&&(typeof u.transform=="function"&&(this._transform=u.transform),typeof u.flush=="function"&&(this._flush=u.flush)),this.on("prefinish",l)}function l(){var u=this;typeof this._flush=="function"&&!this._readableState.destroyed?this._flush(function(d,p){c(u,d,p)}):c(this,null,null)}s.prototype.push=function(u,d){return this._transformState.needTransform=!1,i.prototype.push.call(this,u,d)},s.prototype._transform=function(u,d,p){p(new a("_transform()"))},s.prototype._write=function(u,d,p){var m=this._transformState;if(m.writecb=p,m.writechunk=u,m.writeencoding=d,!m.transforming){var g=this._readableState;(m.needTransform||g.needReadable||g.length<g.highWaterMark)&&this._read(g.highWaterMark)}},s.prototype._read=function(u){var d=this._transformState;d.writechunk!==null&&!d.transforming?(d.transforming=!0,this._transform(d.writechunk,d.writeencoding,d.afterTransform)):d.needTransform=!0},s.prototype._destroy=function(u,d){i.prototype._destroy.call(this,u,function(p){d(p)})};function c(u,d,p){if(d)return u.emit("error",d);if(p!=null&&u.push(p),u._writableState.length)throw new n;if(u._transformState.transforming)throw new r;return u.push(null)}return O7}var A7,tre;function ata(){if(tre)return A7;tre=1,A7=a;var e=are();function a(t){if(!(this instanceof a))return new a(t);e.call(this,t)}return a.prototype._transform=function(t,r,n){n(null,t)},A7}var P7,rre;function tta(){if(rre)return P7;rre=1;var e;function a(p){var m=!1;return function(){m||(m=!0,p.apply(void 0,arguments))}}var t=ev().codes,r=t.ERR_MISSING_ARGS,n=t.ERR_STREAM_DESTROYED;function i(p){if(p)throw p}function o(p){return p.setHeader&&typeof p.abort=="function"}function s(p,m,g,b){b=a(b);var y=!1;p.on("close",function(){y=!0}),e===void 0&&(e=S7()),e(p,{readable:m,writable:g},function(k){if(k)return b(k);y=!0,b()});var v=!1;return function(k){if(!y&&!v){if(v=!0,o(p))return p.abort();if(typeof p.destroy=="function")return p.destroy();b(k||new n("pipe"))}}}function l(p){p()}function c(p,m){return p.pipe(m)}function u(p){return!p.length||typeof p[p.length-1]!="function"?i:p.pop()}function d(){for(var p=arguments.length,m=new Array(p),g=0;g<p;g++)m[g]=arguments[g];var b=u(m);if(Array.isArray(m[0])&&(m=m[0]),m.length<2)throw new r("streams");var y,v=m.map(function(k,z){var C=z<m.length-1,w=z>0;return s(k,C,w,function(S){y||(y=S),S&&v.forEach(l),!C&&(v.forEach(l),b(y))})});return m.reduce(c)}return P7=d,P7}var nre;function ire(){return nre||(nre=1,(function(e,a){a=e.exports=Yte(),a.Stream=a,a.Readable=a,a.Writable=Hte(),a.Duplex=av(),a.Transform=are(),a.PassThrough=ata(),a.finished=S7(),a.pipeline=tta()})(p7,p7.exports)),p7.exports}var ore;function sre(){if(ore)return S2;ore=1;var e=Cte(),a=t9(),t=ire(),r=S2.readyStates={UNSENT:0,OPENED:1,HEADERS_RECEIVED:2,LOADING:3,DONE:4},n=S2.IncomingMessage=function(i,o,s,l){var c=this;if(t.Readable.call(c),c._mode=s,c.headers={},c.rawHeaders=[],c.trailers={},c.rawTrailers=[],c.on("end",function(){process.nextTick(function(){c.emit("close")})}),s==="fetch"){let b=function(){d.read().then(function(y){if(!c._destroyed){if(l(y.done),y.done){c.push(null);return}c.push(Buffer.from(y.value)),b()}}).catch(function(y){l(!0),c._destroyed||c.emit("error",y)})};if(c._fetchResponse=o,c.url=o.url,c.statusCode=o.status,c.statusMessage=o.statusText,o.headers.forEach(function(y,v){c.headers[v.toLowerCase()]=y,c.rawHeaders.push(v,y)}),e.writableStream){var u=new WritableStream({write:function(y){return l(!1),new Promise(function(v,k){c._destroyed?k():c.push(Buffer.from(y))?v():c._resumeFetch=v})},close:function(){l(!0),c._destroyed||c.push(null)},abort:function(y){l(!0),c._destroyed||c.emit("error",y)}});try{o.body.pipeTo(u).catch(function(y){l(!0),c._destroyed||c.emit("error",y)});return}catch{}}var d=o.body.getReader();b()}else{c._xhr=i,c._pos=0,c.url=i.responseURL,c.statusCode=i.status,c.statusMessage=i.statusText;var p=i.getAllResponseHeaders().split(/\r?\n/);if(p.forEach(function(b){var y=b.match(/^([^:]+):\s*(.*)/);if(y){var v=y[1].toLowerCase();v==="set-cookie"?(c.headers[v]===void 0&&(c.headers[v]=[]),c.headers[v].push(y[2])):c.headers[v]!==void 0?c.headers[v]+=", "+y[2]:c.headers[v]=y[2],c.rawHeaders.push(y[1],y[2])}}),c._charset="x-user-defined",!e.overrideMimeType){var m=c.rawHeaders["mime-type"];if(m){var g=m.match(/;\s*charset=([^;])(;|$)/);g&&(c._charset=g[1].toLowerCase())}c._charset||(c._charset="utf-8")}}};return a(n,t.Readable),n.prototype._read=function(){var i=this,o=i._resumeFetch;o&&(i._resumeFetch=null,o())},n.prototype._onXHRProgress=function(i){var o=this,s=o._xhr,l=null;switch(o._mode){case"text":if(l=s.responseText,l.length>o._pos){var c=l.substr(o._pos);if(o._charset==="x-user-defined"){for(var u=Buffer.alloc(c.length),d=0;d<c.length;d++)u[d]=c.charCodeAt(d)&255;o.push(u)}else o.push(c,o._charset);o._pos=l.length}break;case"arraybuffer":if(s.readyState!==r.DONE||!s.response)break;l=s.response,o.push(Buffer.from(new Uint8Array(l)));break;case"moz-chunked-arraybuffer":if(l=s.response,s.readyState!==r.LOADING||!l)break;o.push(Buffer.from(new Uint8Array(l)));break;case"ms-stream":if(l=s.response,s.readyState!==r.LOADING)break;var p=new globalThis.MSStreamReader;p.onprogress=function(){p.result.byteLength>o._pos&&(o.push(Buffer.from(new Uint8Array(p.result.slice(o._pos)))),o._pos=p.result.byteLength)},p.onload=function(){i(!0),o.push(null)},p.readAsArrayBuffer(l);break}o._xhr.readyState===r.DONE&&o._mode!=="ms-stream"&&(i(!0),o.push(null))},S2}var lre;function rta(){if(lre)return d7.exports;lre=1;var e=Cte(),a=t9(),t=sre(),r=ire(),n=t.IncomingMessage,i=t.readyStates;function o(u,d){return e.fetch&&d?"fetch":e.mozchunkedarraybuffer?"moz-chunked-arraybuffer":e.msstream?"ms-stream":e.arraybuffer&&u?"arraybuffer":"text"}var s=d7.exports=function(u){var d=this;r.Writable.call(d),d._opts=u,d._body=[],d._headers={},u.auth&&d.setHeader("Authorization","Basic "+Buffer.from(u.auth).toString("base64")),Object.keys(u.headers).forEach(function(g){d.setHeader(g,u.headers[g])});var p,m=!0;if(u.mode==="disable-fetch"||"requestTimeout"in u&&!e.abortController)m=!1,p=!0;else if(u.mode==="prefer-streaming")p=!1;else if(u.mode==="allow-wrong-content-type")p=!e.overrideMimeType;else if(!u.mode||u.mode==="default"||u.mode==="prefer-fast")p=!0;else throw new Error("Invalid value for opts.mode");d._mode=o(p,m),d._fetchTimer=null,d._socketTimeout=null,d._socketTimer=null,d.on("finish",function(){d._onFinish()})};a(s,r.Writable),s.prototype.setHeader=function(u,d){var p=this,m=u.toLowerCase();c.indexOf(m)===-1&&(p._headers[m]={name:u,value:d})},s.prototype.getHeader=function(u){var d=this._headers[u.toLowerCase()];return d?d.value:null},s.prototype.removeHeader=function(u){var d=this;delete d._headers[u.toLowerCase()]},s.prototype._onFinish=function(){var u=this;if(!u._destroyed){var d=u._opts;"timeout"in d&&d.timeout!==0&&u.setTimeout(d.timeout);var p=u._headers,m=null;d.method!=="GET"&&d.method!=="HEAD"&&(m=new Blob(u._body,{type:(p["content-type"]||{}).value||""}));var g=[];if(Object.keys(p).forEach(function(k){var z=p[k].name,C=p[k].value;Array.isArray(C)?C.forEach(function(w){g.push([z,w])}):g.push([z,C])}),u._mode==="fetch"){var b=null;if(e.abortController){var y=new AbortController;b=y.signal,u._fetchAbortController=y,"requestTimeout"in d&&d.requestTimeout!==0&&(u._fetchTimer=globalThis.setTimeout(function(){u.emit("requestTimeout"),u._fetchAbortController&&u._fetchAbortController.abort()},d.requestTimeout))}globalThis.fetch(u._opts.url,{method:u._opts.method,headers:g,body:m||void 0,mode:"cors",credentials:d.withCredentials?"include":"same-origin",signal:b}).then(function(k){u._fetchResponse=k,u._resetTimers(!1),u._connect()},function(k){u._resetTimers(!0),u._destroyed||u.emit("error",k)})}else{var v=u._xhr=new globalThis.XMLHttpRequest;try{v.open(u._opts.method,u._opts.url,!0)}catch(k){process.nextTick(function(){u.emit("error",k)});return}"responseType"in v&&(v.responseType=u._mode),"withCredentials"in v&&(v.withCredentials=!!d.withCredentials),u._mode==="text"&&"overrideMimeType"in v&&v.overrideMimeType("text/plain; charset=x-user-defined"),"requestTimeout"in d&&(v.timeout=d.requestTimeout,v.ontimeout=function(){u.emit("requestTimeout")}),g.forEach(function(k){v.setRequestHeader(k[0],k[1])}),u._response=null,v.onreadystatechange=function(){switch(v.readyState){case i.LOADING:case i.DONE:u._onXHRProgress();break}},u._mode==="moz-chunked-arraybuffer"&&(v.onprogress=function(){u._onXHRProgress()}),v.onerror=function(){u._destroyed||(u._resetTimers(!0),u.emit("error",new Error("XHR error")))};try{v.send(m)}catch(k){process.nextTick(function(){u.emit("error",k)});return}}}};function l(u){try{var d=u.status;return d!==null&&d!==0}catch{return!1}}s.prototype._onXHRProgress=function(){var u=this;u._resetTimers(!1),!(!l(u._xhr)||u._destroyed)&&(u._response||u._connect(),u._response._onXHRProgress(u._resetTimers.bind(u)))},s.prototype._connect=function(){var u=this;u._destroyed||(u._response=new n(u._xhr,u._fetchResponse,u._mode,u._resetTimers.bind(u)),u._response.on("error",function(d){u.emit("error",d)}),u.emit("response",u._response))},s.prototype._write=function(u,d,p){var m=this;m._body.push(u),p()},s.prototype._resetTimers=function(u){var d=this;globalThis.clearTimeout(d._socketTimer),d._socketTimer=null,u?(globalThis.clearTimeout(d._fetchTimer),d._fetchTimer=null):d._socketTimeout&&(d._socketTimer=globalThis.setTimeout(function(){d.emit("timeout")},d._socketTimeout))},s.prototype.abort=s.prototype.destroy=function(u){var d=this;d._destroyed=!0,d._resetTimers(!0),d._response&&(d._response._destroyed=!0),d._xhr?d._xhr.abort():d._fetchAbortController&&d._fetchAbortController.abort(),u&&d.emit("error",u)},s.prototype.end=function(u,d,p){var m=this;typeof u=="function"&&(p=u,u=void 0),r.Writable.prototype.end.call(m,u,d,p)},s.prototype.setTimeout=function(u,d){var p=this;d&&p.once("timeout",d),p._socketTimeout=u,p._resetTimers(!1)},s.prototype.flushHeaders=function(){},s.prototype.setNoDelay=function(){},s.prototype.setSocketKeepAlive=function(){};var c=["accept-charset","accept-encoding","access-control-request-headers","access-control-request-method","connection","content-length","cookie","cookie2","date","dnt","expect","host","keep-alive","origin","referer","te","trailer","transfer-encoding","upgrade","via"];return d7.exports}var M7,cre;function nta(){if(cre)return M7;cre=1,M7=a;var e=Object.prototype.hasOwnProperty;function a(){for(var t={},r=0;r<arguments.length;r++){var n=arguments[r];for(var i in n)e.call(n,i)&&(t[i]=n[i])}return t}return M7}var ure,dre;function ita(){return dre||(dre=1,ure={100:"Continue",101:"Switching Protocols",102:"Processing",200:"OK",201:"Created",202:"Accepted",203:"Non-Authoritative Information",204:"No Content",205:"Reset Content",206:"Partial Content",207:"Multi-Status",208:"Already Reported",226:"IM Used",300:"Multiple Choices",301:"Moved Permanently",302:"Found",303:"See Other",304:"Not Modified",305:"Use Proxy",307:"Temporary Redirect",308:"Permanent Redirect",400:"Bad Request",401:"Unauthorized",402:"Payment Required",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",406:"Not Acceptable",407:"Proxy Authentication Required",408:"Request Timeout",409:"Conflict",410:"Gone",411:"Length Required",412:"Precondition Failed",413:"Payload Too Large",414:"URI Too Long",415:"Unsupported Media Type",416:"Range Not Satisfiable",417:"Expectation Failed",418:"I'm a teapot",421:"Misdirected Request",422:"Unprocessable Entity",423:"Locked",424:"Failed Dependency",425:"Unordered Collection",426:"Upgrade Required",428:"Precondition Required",429:"Too Many Requests",431:"Request Header Fields Too Large",451:"Unavailable For Legal Reasons",500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Timeout",505:"HTTP Version Not Supported",506:"Variant Also Negotiates",507:"Insufficient Storage",508:"Loop Detected",509:"Bandwidth Limit Exceeded",510:"Not Extended",511:"Network Authentication Required"}),ure}var pre;function ota(){return pre||(pre=1,(function(e){var a=rta(),t=sre(),r=nta(),n=ita(),i=QB(),o=e;o.request=function(s,l){typeof s=="string"?s=i.parse(s):s=r(s);var c=globalThis.location.protocol.search(/^https?:$/)===-1?"http:":"",u=s.protocol||c,d=s.hostname||s.host,p=s.port,m=s.path||"/";d&&d.indexOf(":")!==-1&&(d="["+d+"]"),s.url=(d?u+"//"+d:"")+(p?":"+p:"")+m,s.method=(s.method||"GET").toUpperCase(),s.headers=s.headers||{};var g=new a(s);return l&&g.on("response",l),g},o.get=function(s,l){var c=o.request(s,l);return c.end(),c},o.ClientRequest=a,o.IncomingMessage=t.IncomingMessage,o.Agent=function(){},o.Agent.defaultMaxSockets=4,o.globalAgent=new o.Agent,o.STATUS_CODES=n,o.METHODS=["CHECKOUT","CONNECT","COPY","DELETE","GET","HEAD","LOCK","M-SEARCH","MERGE","MKACTIVITY","MKCOL","MOVE","NOTIFY","OPTIONS","PATCH","POST","PROPFIND","PROPPATCH","PURGE","PUT","REPORT","SEARCH","SUBSCRIBE","TRACE","UNLOCK","UNSUBSCRIBE"]})(wte)),wte}var hre,mre;function sta(){return mre||(mre=1,hre={statusCodes:Object.assign({},{default:"Default response","1XX":"Informational",103:"Early hints","2XX":"Successful","3XX":"Redirection","4XX":"Client Error","5XX":"Server Error","7XX":"Developer Error"},ota().STATUS_CODES)}),hre}const lta="7.0.8",cta={version:lta};var T7,fre;function uta(){if(fre)return T7;fre=1;const e=Yg,a=QB(),t=Vaa(),r=Yg,n=Yg,i=w2(),o=i.jptr,s=t7().isRef,l=z2().clone,c=z2().circularClone,u=i7().recurse,d=Gaa(),p=qaa(),m=yte(),g=sta().statusCodes,b=cta.version,y="3.0.0";let v;class k extends Error{constructor($){super($),this.name="S2OError"}}function z(M,$){let oe=new k(M);if(oe.options=$,$.promise)$.promise.reject(oe);else throw oe}function C(M,$,oe){oe.warnOnly?$[oe.warnProperty||"x-s2o-warning"]=M:z(M,oe)}function w(M,$,oe){if(M.nullable&&oe.patches++,M.discriminator&&typeof M.discriminator=="string"&&(M.discriminator={propertyName:M.discriminator}),M.items&&Array.isArray(M.items)&&(M.items.length===0?M.items={}:M.items.length===1?M.items=M.items[0]:M.items={anyOf:M.items}),M.type&&Array.isArray(M.type))if(oe.patch){if(oe.patches++,M.type.length===0)delete M.type;else{M.oneOf||(M.oneOf=[]);for(let G of M.type){let ce={};if(G==="null")M.nullable=!0;else{ce.type=G;for(let pe of m.arrayProperties)typeof M.prop<"u"&&(ce[pe]=M[pe],delete M[pe])}ce.type&&M.oneOf.push(ce)}delete M.type,M.oneOf.length===0?delete M.oneOf:M.oneOf.length<2&&(M.type=M.oneOf[0].type,Object.keys(M.oneOf[0]).length>1&&C("Lost properties from oneOf",M,oe),delete M.oneOf)}M.type&&Array.isArray(M.type)&&M.type.length===1&&(M.type=M.type[0])}else z("(Patchable) schema type must not be an array",oe);M.type&&M.type==="null"&&(delete M.type,M.nullable=!0),M.type==="array"&&!M.items&&(M.items={}),M.type==="file"&&(M.type="string",M.format="binary"),typeof M.required=="boolean"&&(M.required&&M.name&&(typeof $.required>"u"&&($.required=[]),Array.isArray($.required)&&$.required.push(M.name)),delete M.required),M.xml&&typeof M.xml.namespace=="string"&&(M.xml.namespace||delete M.xml.namespace),typeof M.allowEmptyValue<"u"&&(oe.patches++,delete M.allowEmptyValue)}function S(M,$){if(M["x-required"]&&Array.isArray(M["x-required"])&&(M.required||(M.required=[]),M.required=M.required.concat(M["x-required"]),delete M["x-required"]),M["x-anyOf"]&&(M.anyOf=M["x-anyOf"],delete M["x-anyOf"]),M["x-oneOf"]&&(M.oneOf=M["x-oneOf"],delete M["x-oneOf"]),M["x-not"]&&(M.not=M["x-not"],delete M["x-not"]),typeof M["x-nullable"]=="boolean"&&(M.nullable=M["x-nullable"],delete M["x-nullable"]),typeof M["x-discriminator"]=="object"&&typeof M["x-discriminator"].propertyName=="string"){M.discriminator=M["x-discriminator"],delete M["x-discriminator"];for(let oe in M.discriminator.mapping){let G=M.discriminator.mapping[oe];G.startsWith("#/definitions/")&&(M.discriminator.mapping[oe]=G.replace("#/definitions/","#/components/schemas/"))}}}function O(M,$){p.walkSchema(M,{},{},function(oe,G,ce){S(oe),w(oe,G,$)})}function A(M){return M.indexOf("#")>=0?M=M.split("#")[1].split("/").pop():M=M.split("/").pop().split(".")[0],encodeURIComponent(m.sanitise(M))}function B(M,$,oe){let G=oe.payload.options;if(s(M,$)){if(!M[$].startsWith("#/components/")){if(M[$]==="#/consumes")delete M[$],oe.parent[oe.pkey]=l(G.openapi.consumes);else if(M[$]==="#/produces")delete M[$],oe.parent[oe.pkey]=l(G.openapi.produces);else if(M[$].startsWith("#/definitions/")){let ce=M[$].replace("#/definitions/","").split("/");const pe=i.jpunescape(ce[0]);let Q=v.schemas[decodeURIComponent(pe)];Q?ce[0]=Q:C("Could not resolve reference "+M[$],M,G),M[$]="#/components/schemas/"+ce.join("/")}else if(M[$].startsWith("#/parameters/"))M[$]="#/components/parameters/"+m.sanitise(M[$].replace("#/parameters/",""));else if(M[$].startsWith("#/responses/"))M[$]="#/components/responses/"+m.sanitise(M[$].replace("#/responses/",""));else if(M[$].startsWith("#")){let ce=l(i.jptr(G.openapi,M[$]));if(ce===!1)C("direct $ref not found "+M[$],M,G);else if(G.refmap[M[$]])M[$]=G.refmap[M[$]];else{let pe=M[$];pe=pe.replace("/properties/headers/",""),pe=pe.replace("/properties/responses/",""),pe=pe.replace("/properties/parameters/",""),pe=pe.replace("/properties/schemas/","");let Q="schemas",re=pe.lastIndexOf("/schema");if(Q=pe.indexOf("/headers/")>re?"headers":pe.indexOf("/responses/")>re?"responses":pe.indexOf("/example")>re?"examples":pe.indexOf("/x-")>re?"extensions":pe.indexOf("/parameters/")>re?"parameters":"schemas",Q==="schemas"&&O(ce,G),Q!=="responses"&&Q!=="extensions"){let de=Q.substr(0,Q.length-1);de==="parameter"&&ce.name&&ce.name===m.sanitise(ce.name)&&(de=encodeURIComponent(ce.name));let fe=1;for(M["x-miro"]&&(de=A(M["x-miro"]),fe="");i.jptr(G.openapi,"#/components/"+Q+"/"+de+fe);)fe=fe===""?2:++fe;let ge="#/components/"+Q+"/"+de+fe,he="";Q==="examples"&&(ce={value:ce},he="/value"),i.jptr(G.openapi,ge,ce),G.refmap[M[$]]=ge+he,M[$]=ge+he}}}}if(delete M["x-miro"],Object.keys(M).length>1){const ce=M[$],pe=oe.path.indexOf("/schema")>=0;G.refSiblings==="preserve"||(pe&&G.refSiblings==="allOf"?(delete M.$ref,oe.parent[oe.pkey]={allOf:[{$ref:ce},M]}):oe.parent[oe.pkey]={$ref:ce})}}if($==="x-ms-odata"&&typeof M[$]=="string"&&M[$].startsWith("#/")){let ce=M[$].replace("#/definitions/","").replace("#/components/schemas/","").split("/"),pe=v.schemas[decodeURIComponent(ce[0])];pe?ce[0]=pe:C("Could not resolve reference "+M[$],M,G),M[$]="#/components/schemas/"+ce.join("/")}}function L(M,$){for(let oe in $.refmap)i.jptr(M,oe,{$ref:$.refmap[oe]})}function q(M){for(let $ in M)for(let oe in M[$]){let G=m.sanitise(oe);oe!==G&&(M[$][G]=M[$][oe],delete M[$][oe])}}function N(M,$){if(M.type==="basic"&&(M.type="http",M.scheme="basic"),M.type==="oauth2"){let oe={},G=M.flow;M.flow==="application"&&(G="clientCredentials"),M.flow==="accessCode"&&(G="authorizationCode"),typeof M.authorizationUrl<"u"&&(oe.authorizationUrl=M.authorizationUrl.split("?")[0].trim()||"/"),typeof M.tokenUrl=="string"&&(oe.tokenUrl=M.tokenUrl.split("?")[0].trim()||"/"),oe.scopes=M.scopes||{},M.flows={},M.flows[G]=oe,delete M.flow,delete M.authorizationUrl,delete M.tokenUrl,delete M.scopes,typeof M.name<"u"&&($.patch?($.patches++,delete M.name):z("(Patchable) oauth2 securitySchemes should not have name property",$))}}function U(M){return M&&!M["x-s2o-delete"]}function D(M,$){if(M.$ref)M.$ref=M.$ref.replace("#/responses/","#/components/responses/");else{M.type&&!M.schema&&(M.schema={}),M.type&&(M.schema.type=M.type),M.items&&M.items.type!=="array"&&(M.items.collectionFormat!==M.collectionFormat&&C("Nested collectionFormats are not supported",M,$),delete M.items.collectionFormat),M.type==="array"?(M.collectionFormat==="ssv"?C("collectionFormat:ssv is no longer supported for headers",M,$):M.collectionFormat==="pipes"?C("collectionFormat:pipes is no longer supported for headers",M,$):M.collectionFormat==="multi"?M.explode=!0:M.collectionFormat==="tsv"?(C("collectionFormat:tsv is no longer supported",M,$),M["x-collectionFormat"]="tsv"):M.style="simple",delete M.collectionFormat):M.collectionFormat&&($.patch?($.patches++,delete M.collectionFormat):z("(Patchable) collectionFormat is only applicable to header.type array",$)),delete M.type;for(let oe of m.parameterTypeProperties)typeof M[oe]<"u"&&(M.schema[oe]=M[oe],delete M[oe]);for(let oe of m.arrayProperties)typeof M[oe]<"u"&&(M.schema[oe]=M[oe],delete M[oe])}}function Y(M,$){if(M.$ref.indexOf("#/parameters/")>=0){let oe=M.$ref.split("#/parameters/");M.$ref=oe[0]+"#/components/parameters/"+m.sanitise(oe[1])}M.$ref.indexOf("#/definitions/")>=0&&C("Definition used as parameter",M,$)}function te(M,$){let oe={};for(let G of Object.keys(M))oe[G]=M[G],G==="parameters"&&(oe.requestBody={},$.rbname&&(oe[$.rbname]=""));return oe.requestBody={},oe}function ue(M,$,oe,G,ce,pe,Q){let re={},de=!0,fe;if($&&$.consumes&&typeof $.consumes=="string")if(Q.patch)Q.patches++,$.consumes=[$.consumes];else return z("(Patchable) operation.consumes must be an array",Q);Array.isArray(pe.consumes)||delete pe.consumes;let ge=(($?$.consumes:null)||pe.consumes||[]).filter(m.uniqueOnly);if(M&&M.$ref&&typeof M.$ref=="string"){Y(M,Q);let he=decodeURIComponent(M.$ref.replace("#/components/parameters/","")),xe=!1,Oe=pe.components.parameters[he];if((!Oe||Oe["x-s2o-delete"])&&M.$ref.startsWith("#/")&&(M["x-s2o-delete"]=!0,xe=!0),xe){let _e=M.$ref,Ye=o(pe,M.$ref);!Ye&&_e.startsWith("#/")?C("Could not resolve reference "+_e,M,Q):Ye&&(M=Ye)}}if(M&&(M.name||M.in)){typeof M["x-deprecated"]=="boolean"&&(M.deprecated=M["x-deprecated"],delete M["x-deprecated"]),typeof M["x-example"]<"u"&&(M.example=M["x-example"],delete M["x-example"]),M.in!=="body"&&!M.type&&(Q.patch?(Q.patches++,M.type="string"):z("(Patchable) parameter.type is mandatory for non-body parameters",Q)),M.type&&typeof M.type=="object"&&M.type.$ref&&(M.type=o(pe,M.type.$ref)),M.type==="file"&&(M["x-s2o-originalType"]=M.type,fe=M.type),M.description&&typeof M.description=="object"&&M.description.$ref&&(M.description=o(pe,M.description.$ref)),M.description===null&&delete M.description;let he=M.collectionFormat;if(M.type==="array"&&!he&&(he="csv"),he&&(M.type!=="array"&&(Q.patch?(Q.patches++,delete M.collectionFormat):z("(Patchable) collectionFormat is only applicable to param.type array",Q)),he==="csv"&&(M.in==="query"||M.in==="cookie")&&(M.style="form",M.explode=!1),he==="csv"&&(M.in==="path"||M.in==="header")&&(M.style="simple"),he==="ssv"&&(M.in==="query"?M.style="spaceDelimited":C("collectionFormat:ssv is no longer supported except for in:query parameters",M,Q)),he==="pipes"&&(M.in==="query"?M.style="pipeDelimited":C("collectionFormat:pipes is no longer supported except for in:query parameters",M,Q)),he==="multi"&&(M.explode=!0),he==="tsv"&&(C("collectionFormat:tsv is no longer supported",M,Q),M["x-collectionFormat"]="tsv"),delete M.collectionFormat),M.type&&M.type!=="body"&&M.in!=="formData")if(M.items&&M.schema)C("parameter has array,items and schema",M,Q);else{M.schema&&Q.patches++,(!M.schema||typeof M.schema!="object")&&(M.schema={}),M.schema.type=M.type,M.items&&(M.schema.items=M.items,delete M.items,u(M.schema.items,null,function(xe,Oe,_e){Oe==="collectionFormat"&&typeof xe[Oe]=="string"&&(he&&xe[Oe]!==he&&C("Nested collectionFormats are not supported",M,Q),delete xe[Oe])}));for(let xe of m.parameterTypeProperties)typeof M[xe]<"u"&&(M.schema[xe]=M[xe]),delete M[xe]}M.schema&&O(M.schema,Q),M["x-ms-skip-url-encoding"]&&M.in==="query"&&(M.allowReserved=!0,delete M["x-ms-skip-url-encoding"])}if(M&&M.in==="formData"){de=!1,re.content={};let he="application/x-www-form-urlencoded";if(ge.length&&ge.indexOf("multipart/form-data")>=0&&(he="multipart/form-data"),re.content[he]={},M.schema)re.content[he].schema=M.schema,M.schema.$ref&&(re["x-s2o-name"]=decodeURIComponent(M.schema.$ref.replace("#/components/schemas/","")));else{re.content[he].schema={},re.content[he].schema.type="object",re.content[he].schema.properties={},re.content[he].schema.properties[M.name]={};let xe=re.content[he].schema,Oe=re.content[he].schema.properties[M.name];M.description&&(Oe.description=M.description),M.example&&(Oe.example=M.example),M.type&&(Oe.type=M.type);for(let _e of m.parameterTypeProperties)typeof M[_e]<"u"&&(Oe[_e]=M[_e]);M.required===!0&&(xe.required||(xe.required=[]),xe.required.push(M.name),re.required=!0),typeof M.default<"u"&&(Oe.default=M.default),Oe.properties&&(Oe.properties=M.properties),M.allOf&&(Oe.allOf=M.allOf),M.type==="array"&&M.items&&(Oe.items=M.items,Oe.items.collectionFormat&&delete Oe.items.collectionFormat),(fe==="file"||M["x-s2o-originalType"]==="file")&&(Oe.type="string",Oe.format="binary"),ne(M,Oe)}}else M&&M.type==="file"&&(M.required&&(re.required=M.required),re.content={},re.content["application/octet-stream"]={},re.content["application/octet-stream"].schema={},re.content["application/octet-stream"].schema.type="string",re.content["application/octet-stream"].schema.format="binary",ne(M,re));if(M&&M.in==="body"){re.content={},M.name&&(re["x-s2o-name"]=($&&$.operationId?m.sanitiseAll($.operationId):"")+("_"+M.name).toCamelCase()),M.description&&(re.description=M.description),M.required&&(re.required=M.required),$&&Q.rbname&&M.name&&($[Q.rbname]=M.name),M.schema&&M.schema.$ref?re["x-s2o-name"]=decodeURIComponent(M.schema.$ref.replace("#/components/schemas/","")):M.schema&&M.schema.type==="array"&&M.schema.items&&M.schema.items.$ref&&(re["x-s2o-name"]=decodeURIComponent(M.schema.items.$ref.replace("#/components/schemas/",""))+"Array"),ge.length||ge.push("application/json");for(let he of ge)re.content[he]={},re.content[he].schema=l(M.schema||{}),O(re.content[he].schema,Q);ne(M,re)}if(Object.keys(re).length>0&&(M["x-s2o-delete"]=!0,$))if($.requestBody&&de){$.requestBody["x-s2o-overloaded"]=!0;let he=$.operationId||ce;C("Operation "+he+" has multiple requestBodies",$,Q)}else $.requestBody||($=oe[G]=te($,Q)),$.requestBody.content&&$.requestBody.content["multipart/form-data"]&&$.requestBody.content["multipart/form-data"].schema&&$.requestBody.content["multipart/form-data"].schema.properties&&re.content["multipart/form-data"]&&re.content["multipart/form-data"].schema&&re.content["multipart/form-data"].schema.properties?($.requestBody.content["multipart/form-data"].schema.properties=Object.assign($.requestBody.content["multipart/form-data"].schema.properties,re.content["multipart/form-data"].schema.properties),$.requestBody.content["multipart/form-data"].schema.required=($.requestBody.content["multipart/form-data"].schema.required||[]).concat(re.content["multipart/form-data"].schema.required||[]),$.requestBody.content["multipart/form-data"].schema.required.length||delete $.requestBody.content["multipart/form-data"].schema.required):$.requestBody.content&&$.requestBody.content["application/x-www-form-urlencoded"]&&$.requestBody.content["application/x-www-form-urlencoded"].schema&&$.requestBody.content["application/x-www-form-urlencoded"].schema.properties&&re.content["application/x-www-form-urlencoded"]&&re.content["application/x-www-form-urlencoded"].schema&&re.content["application/x-www-form-urlencoded"].schema.properties?($.requestBody.content["application/x-www-form-urlencoded"].schema.properties=Object.assign($.requestBody.content["application/x-www-form-urlencoded"].schema.properties,re.content["application/x-www-form-urlencoded"].schema.properties),$.requestBody.content["application/x-www-form-urlencoded"].schema.required=($.requestBody.content["application/x-www-form-urlencoded"].schema.required||[]).concat(re.content["application/x-www-form-urlencoded"].schema.required||[]),$.requestBody.content["application/x-www-form-urlencoded"].schema.required.length||delete $.requestBody.content["application/x-www-form-urlencoded"].schema.required):($.requestBody=Object.assign($.requestBody,re),$.requestBody["x-s2o-name"]||($.requestBody.schema&&$.requestBody.schema.$ref?$.requestBody["x-s2o-name"]=decodeURIComponent($.requestBody.schema.$ref.replace("#/components/schemas/","")).split("/").join(""):$.operationId&&($.requestBody["x-s2o-name"]=m.sanitiseAll($.operationId))));if(M&&!M["x-s2o-delete"]){delete M.type;for(let he of m.parameterTypeProperties)delete M[he];M.in==="path"&&(typeof M.required>"u"||M.required!==!0)&&(Q.patch?(Q.patches++,M.required=!0):z("(Patchable) path parameters must be required:true ["+M.name+" in "+ce+"]",Q))}return $}function ne(M,$){for(let oe in M)oe.startsWith("x-")&&!oe.startsWith("x-s2o")&&($[oe]=M[oe])}function me(M,$,oe,G,ce){if(!M)return!1;if(M.$ref&&typeof M.$ref=="string")M.$ref.indexOf("#/definitions/")>=0?C("definition used as response: "+M.$ref,M,ce):M.$ref.startsWith("#/responses/")&&(M.$ref="#/components/responses/"+m.sanitise(decodeURIComponent(M.$ref.replace("#/responses/",""))));else{if((typeof M.description>"u"||M.description===null||M.description===""&&ce.patch)&&(ce.patch?typeof M=="object"&&!Array.isArray(M)&&(ce.patches++,M.description=g[M]||""):z("(Patchable) response.description is mandatory",ce)),typeof M.schema<"u"){if(O(M.schema,ce),M.schema.$ref&&typeof M.schema.$ref=="string"&&M.schema.$ref.startsWith("#/responses/")&&(M.schema.$ref="#/components/responses/"+m.sanitise(decodeURIComponent(M.schema.$ref.replace("#/responses/","")))),oe&&oe.produces&&typeof oe.produces=="string")if(ce.patch)ce.patches++,oe.produces=[oe.produces];else return z("(Patchable) operation.produces must be an array",ce);G.produces&&!Array.isArray(G.produces)&&delete G.produces;let pe=((oe?oe.produces:null)||G.produces||[]).filter(m.uniqueOnly);pe.length||pe.push("*/*"),M.content={};for(let Q of pe){if(M.content[Q]={},M.content[Q].schema=l(M.schema),M.examples&&M.examples[Q]){let re={};re.value=M.examples[Q],M.content[Q].examples={},M.content[Q].examples.response=re,delete M.examples[Q]}M.content[Q].schema.type==="file"&&(M.content[Q].schema={type:"string",format:"binary"})}delete M.schema}for(let pe in M.examples)M.content||(M.content={}),M.content[pe]||(M.content[pe]={}),M.content[pe].examples={},M.content[pe].examples.response={},M.content[pe].examples.response.value=M.examples[pe];if(delete M.examples,M.headers)for(let pe in M.headers)pe.toLowerCase()==="status code"?ce.patch?(ce.patches++,delete M.headers[pe]):z('(Patchable) "Status Code" is not a valid header',ce):D(M.headers[pe],ce)}}function I(M,$,oe,G,ce){for(let pe in M){let Q=M[pe];Q&&Q["x-trace"]&&typeof Q["x-trace"]=="object"&&(Q.trace=Q["x-trace"],delete Q["x-trace"]),Q&&Q["x-summary"]&&typeof Q["x-summary"]=="string"&&(Q.summary=Q["x-summary"],delete Q["x-summary"]),Q&&Q["x-description"]&&typeof Q["x-description"]=="string"&&(Q.description=Q["x-description"],delete Q["x-description"]),Q&&Q["x-servers"]&&Array.isArray(Q["x-servers"])&&(Q.servers=Q["x-servers"],delete Q["x-servers"]);for(let re in Q)if(m.httpMethods.indexOf(re)>=0||re==="x-amazon-apigateway-any-method"){let de=Q[re];if(de&&de.parameters&&Array.isArray(de.parameters)){if(Q.parameters)for(let fe of Q.parameters)typeof fe.$ref=="string"&&(Y(fe,oe),fe=o(ce,fe.$ref)),!de.parameters.find(function(ge,he,xe){return ge.name===fe.name&&ge.in===fe.in})&&(fe.in==="formData"||fe.in==="body"||fe.type==="file")&&(de=ue(fe,de,Q,re,pe,ce,oe),oe.rbname&&de[oe.rbname]===""&&delete de[oe.rbname]);for(let fe of de.parameters)de=ue(fe,de,Q,re,re+":"+pe,ce,oe);oe.rbname&&de[oe.rbname]===""&&delete de[oe.rbname],oe.debug||de.parameters&&(de.parameters=de.parameters.filter(U))}if(de&&de.security&&q(de.security),typeof de=="object"){if(!de.responses){let fe={};fe.description="Default response",de.responses={default:fe}}for(let fe in de.responses){let ge=de.responses[fe];me(ge,fe,de,ce,oe)}}if(de&&de["x-servers"]&&Array.isArray(de["x-servers"]))de.servers=de["x-servers"],delete de["x-servers"];else if(de&&de.schemes&&de.schemes.length){for(let fe of de.schemes)if((!ce.schemes||ce.schemes.indexOf(fe)<0)&&(de.servers||(de.servers=[]),Array.isArray(ce.servers)))for(let ge of ce.servers){let he=l(ge),xe=a.parse(he.url);xe.protocol=fe,he.url=xe.format(),de.servers.push(he)}}if(oe.debug&&(de["x-s2o-consumes"]=de.consumes||[],de["x-s2o-produces"]=de.produces||[]),de){if(delete de.consumes,delete de.produces,delete de.schemes,de["x-ms-examples"]){for(let fe in de["x-ms-examples"]){let ge=de["x-ms-examples"][fe],he=m.sanitiseAll(fe);if(ge.parameters)for(let xe in ge.parameters){let Oe=ge.parameters[xe];for(let _e of(de.parameters||[]).concat(Q.parameters||[]))_e.$ref&&(_e=i.jptr(ce,_e.$ref)),_e.name===xe&&!_e.example&&(_e.examples||(_e.examples={}),_e.examples[fe]={value:Oe})}if(ge.responses)for(let xe in ge.responses){if(ge.responses[xe].headers)for(let Oe in ge.responses[xe].headers){let _e=ge.responses[xe].headers[Oe];for(let Ye in de.responses[xe].headers)if(Ye===Oe){let E=de.responses[xe].headers[Ye];E.example=_e}}if(ge.responses[xe].body&&(ce.components.examples[he]={value:l(ge.responses[xe].body)},de.responses[xe]&&de.responses[xe].content))for(let Oe in de.responses[xe].content){let _e=de.responses[xe].content[Oe];_e.examples||(_e.examples={}),_e.examples[fe]={$ref:"#/components/examples/"+he}}}}delete de["x-ms-examples"]}if(de.parameters&&de.parameters.length===0&&delete de.parameters,de.requestBody){let fe=de.operationId?m.sanitiseAll(de.operationId):m.sanitiseAll(re+pe).toCamelCase(),ge=m.sanitise(de.requestBody["x-s2o-name"]||fe||"");delete de.requestBody["x-s2o-name"];let he=JSON.stringify(de.requestBody),xe=m.hash(he);if(!G[xe]){let _e={};_e.name=ge,_e.body=de.requestBody,_e.refs=[],G[xe]=_e}let Oe="#/"+$+"/"+encodeURIComponent(i.jpescape(pe))+"/"+re+"/requestBody";G[xe].refs.push(Oe)}}}if(Q&&Q.parameters){for(let re in Q.parameters){let de=Q.parameters[re];ue(de,null,Q,null,pe,ce,oe)}!oe.debug&&Array.isArray(Q.parameters)&&(Q.parameters=Q.parameters.filter(U))}}}function K(M,$){let oe={};v={schemas:{}},M.security&&q(M.security);for(let ce in M.components.securitySchemes){let pe=m.sanitise(ce);ce!==pe&&(M.components.securitySchemes[pe]&&z("Duplicate sanitised securityScheme name "+pe,$),M.components.securitySchemes[pe]=M.components.securitySchemes[ce],delete M.components.securitySchemes[ce]),N(M.components.securitySchemes[pe],$)}for(let ce in M.components.schemas){let pe=m.sanitiseAll(ce),Q="";if(ce!==pe){for(;M.components.schemas[pe+Q];)Q=Q?++Q:2;M.components.schemas[pe+Q]=M.components.schemas[ce],delete M.components.schemas[ce]}v.schemas[ce]=pe+Q,O(M.components.schemas[pe+Q],$)}$.refmap={},u(M,{payload:{options:$}},B),L(M,$);for(let ce in M.components.parameters){let pe=m.sanitise(ce);ce!==pe&&(M.components.parameters[pe]&&z("Duplicate sanitised parameter name "+pe,$),M.components.parameters[pe]=M.components.parameters[ce],delete M.components.parameters[ce]);let Q=M.components.parameters[pe];ue(Q,null,null,null,pe,M,$)}for(let ce in M.components.responses){let pe=m.sanitise(ce);ce!==pe&&(M.components.responses[pe]&&z("Duplicate sanitised response name "+pe,$),M.components.responses[pe]=M.components.responses[ce],delete M.components.responses[ce]);let Q=M.components.responses[pe];if(me(Q,pe,null,M,$),Q.headers)for(let re in Q.headers)re.toLowerCase()==="status code"?$.patch?($.patches++,delete Q.headers[re]):z('(Patchable) "Status Code" is not a valid header',$):D(Q.headers[re],$)}for(let ce in M.components.requestBodies){let pe=M.components.requestBodies[ce],Q=JSON.stringify(pe),re=m.hash(Q),de={};de.name=ce,de.body=pe,de.refs=[],oe[re]=de}if(I(M.paths,"paths",$,oe,M),M["x-ms-paths"]&&I(M["x-ms-paths"],"x-ms-paths",$,oe,M),!$.debug)for(let ce in M.components.parameters)M.components.parameters[ce]["x-s2o-delete"]&&delete M.components.parameters[ce];$.debug&&(M["x-s2o-consumes"]=M.consumes||[],M["x-s2o-produces"]=M.produces||[]),delete M.consumes,delete M.produces,delete M.schemes;let G=[];if(M.components.requestBodies={},!$.resolveInternal){let ce=1;for(let pe in oe){let Q=oe[pe];if(Q.refs.length>1){let re="";for(Q.name||(Q.name="requestBody",re=ce++);G.indexOf(Q.name+re)>=0;)re=re?++re:2;Q.name=Q.name+re,G.push(Q.name),M.components.requestBodies[Q.name]=l(Q.body);for(let de in Q.refs){let fe={};fe.$ref="#/components/requestBodies/"+Q.name,i.jptr(M,Q.refs[de],fe)}}}}return M.components.responses&&Object.keys(M.components.responses).length===0&&delete M.components.responses,M.components.parameters&&Object.keys(M.components.parameters).length===0&&delete M.components.parameters,M.components.examples&&Object.keys(M.components.examples).length===0&&delete M.components.examples,M.components.requestBodies&&Object.keys(M.components.requestBodies).length===0&&delete M.components.requestBodies,M.components.securitySchemes&&Object.keys(M.components.securitySchemes).length===0&&delete M.components.securitySchemes,M.components.headers&&Object.keys(M.components.headers).length===0&&delete M.components.headers,M.components.schemas&&Object.keys(M.components.schemas).length===0&&delete M.components.schemas,M.components&&Object.keys(M.components).length===0&&delete M.components,M}function W(M){return!M||!M.url||typeof M.url!="string"||(M.url=M.url.split("{{").join("{"),M.url=M.url.split("}}").join("}"),M.url.replace(/\{(.+?)\}/g,function($,oe){M.variables||(M.variables={}),M.variables[oe]={default:"unknown"}})),M}function V(M,$,oe){if(typeof M.info>"u"||M.info===null)if($.patch)$.patches++,M.info={version:"",title:""};else return oe(new k("(Patchable) info object is mandatory"));if(typeof M.info!="object"||Array.isArray(M.info))return oe(new k("info must be an object"));if(typeof M.info.title>"u"||M.info.title===null)if($.patch)$.patches++,M.info.title="";else return oe(new k("(Patchable) info.title cannot be null"));if(typeof M.info.version>"u"||M.info.version===null)if($.patch)$.patches++,M.info.version="";else return oe(new k("(Patchable) info.version cannot be null"));if(typeof M.info.version!="string")if($.patch)$.patches++,M.info.version=M.info.version.toString();else return oe(new k("(Patchable) info.version must be a string"));if(typeof M.info.logo<"u")if($.patch)$.patches++,M.info["x-logo"]=M.info.logo,delete M.info.logo;else return oe(new k("(Patchable) info should not have logo property"));if(typeof M.info.termsOfService<"u"){if(M.info.termsOfService===null)if($.patch)$.patches++,M.info.termsOfService="";else return oe(new k("(Patchable) info.termsOfService cannot be null"));try{new URL(M.info.termsOfService)}catch{if($.patch)$.patches++,delete M.info.termsOfService;else return oe(new k("(Patchable) info.termsOfService must be a URL"))}}}function P(M,$,oe){if(typeof M.paths>"u")if($.patch)$.patches++,M.paths={};else return oe(new k("(Patchable) paths object is mandatory"))}function _(M,$){const oe=new WeakSet;u(M,{identityDetection:!0},function(G,ce,pe){typeof G[ce]=="object"&&G[ce]!==null&&(oe.has(G[ce])?$.anchors?G[ce]=l(G[ce]):z("YAML anchor or merge key at "+pe.path,$):oe.add(G[ce]))})}function F(M,$,oe){return t(oe,new Promise(function(G,ce){if(M||(M={}),$.original=M,$.text||($.text=n.stringify(M)),$.externals=[],$.externalRefs={},$.rewriteRefs=!0,$.preserveMiro=!0,$.promise={},$.promise.resolve=G,$.promise.reject=ce,$.patches=0,$.cache||($.cache={}),$.source&&($.cache[$.source]=$.original),_(M,$),M.openapi&&typeof M.openapi=="string"&&M.openapi.startsWith("3.")){$.openapi=c(M),V($.openapi,$,ce),P($.openapi,$,ce),d.optionalResolve($).then(function(){return $.direct?G($.openapi):G($)}).catch(function(Q){console.warn(Q),ce(Q)});return}if(!M.swagger||M.swagger!="2.0")return ce(new k("Unsupported swagger/OpenAPI version: "+(M.openapi?M.openapi:M.swagger)));let pe=$.openapi={};if(pe.openapi=typeof $.targetVersion=="string"&&$.targetVersion.startsWith("3.")?$.targetVersion:y,$.origin){pe["x-origin"]||(pe["x-origin"]=[]);let Q={};Q.url=$.source||$.origin,Q.format="swagger",Q.version=M.swagger,Q.converter={},Q.converter.url="https://github.com/mermade/oas-kit",Q.converter.version=b,pe["x-origin"].push(Q)}if(pe=Object.assign(pe,c(M)),delete pe.swagger,u(pe,{},function(Q,re,de){Q[re]===null&&!re.startsWith("x-")&&re!=="default"&&de.path.indexOf("/example")<0&&delete Q[re]}),M.host)for(let Q of Array.isArray(M.schemes)?M.schemes:[""]){let re={},de=(M.basePath||"").replace(/\/$/,"");re.url=(Q?Q+":":"")+"//"+M.host+de,W(re),pe.servers||(pe.servers=[]),pe.servers.push(re)}else if(M.basePath){let Q={};Q.url=M.basePath,W(Q),pe.servers||(pe.servers=[]),pe.servers.push(Q)}if(delete pe.host,delete pe.basePath,pe["x-servers"]&&Array.isArray(pe["x-servers"])&&(pe.servers=pe["x-servers"],delete pe["x-servers"]),M["x-ms-parameterized-host"]){let Q=M["x-ms-parameterized-host"],re={};re.url=Q.hostTemplate+(M.basePath?M.basePath:""),re.variables={};const de=re.url.match(/\{\w+\}/g);for(let fe in Q.parameters){let ge=Q.parameters[fe];ge.$ref&&(ge=l(o(pe,ge.$ref))),fe.startsWith("x-")||(delete ge.required,delete ge.type,delete ge.in,typeof ge.default>"u"&&(ge.enum?ge.default=ge.enum[0]:ge.default="none"),ge.name||(ge.name=de[fe].replace("{","").replace("}","")),re.variables[ge.name]=ge,delete ge.name)}pe.servers||(pe.servers=[]),Q.useSchemePrefix===!1?pe.servers.push(re):M.schemes.forEach(fe=>{pe.servers.push(Object.assign({},re,{url:fe+"://"+re.url}))}),delete pe["x-ms-parameterized-host"]}V(pe,$,ce),P(pe,$,ce),typeof pe.consumes=="string"&&(pe.consumes=[pe.consumes]),typeof pe.produces=="string"&&(pe.produces=[pe.produces]),pe.components={},pe["x-callbacks"]&&(pe.components.callbacks=pe["x-callbacks"],delete pe["x-callbacks"]),pe.components.examples={},pe.components.headers={},pe["x-links"]&&(pe.components.links=pe["x-links"],delete pe["x-links"]),pe.components.parameters=pe.parameters||{},pe.components.responses=pe.responses||{},pe.components.requestBodies={},pe.components.securitySchemes=pe.securityDefinitions||{},pe.components.schemas=pe.definitions||{},delete pe.definitions,delete pe.responses,delete pe.parameters,delete pe.securityDefinitions,d.optionalResolve($).then(function(){K($.openapi,$),$.direct?G($.openapi):G($)}).catch(function(Q){console.warn(Q),ce(Q)})}))}function ee(M,$,oe){return t(oe,new Promise(function(G,ce){let pe=null,Q=null;try{pe=JSON.parse(M),$.text=JSON.stringify(pe,null,2)}catch(re){Q=re;try{pe=n.parse(M,{schema:"core",prettyErrors:!0}),$.sourceYaml=!0,$.text=M}catch(de){Q=de}}pe?F(pe,$).then(re=>G(re)).catch(re=>ce(re)):ce(new k(Q?Q.message:"Could not parse string"))}))}function ie(M,$,oe){return t(oe,new Promise(function(G,ce){$.origin=!0,$.source||($.source=M),$.verbose&&console.warn("GET "+M),$.fetch||($.fetch=r);const pe=Object.assign({},$.fetchOptions,{agent:$.agent});$.fetch(M,pe).then(function(Q){if(Q.status!==200)throw new k(`Received status code ${Q.status}: ${M}`);return Q.text()}).then(function(Q){ee(Q,$).then(re=>G(re)).catch(re=>ce(re))}).catch(function(Q){ce(Q)})}))}function be(M,$,oe){return t(oe,new Promise(function(G,ce){e.readFile(M,$.encoding||"utf8",function(pe,Q){pe?ce(pe):($.sourceFile=M,ee(Q,$).then(re=>G(re)).catch(re=>ce(re)))})}))}function X(M,$,oe){return t(oe,new Promise(function(G,ce){let pe="";M.on("data",function(Q){pe+=Q}).on("end",function(){ee(pe,$).then(Q=>G(Q)).catch(Q=>ce(Q))})}))}return T7={S2OError:k,targetVersion:y,convert:F,convertObj:F,convertUrl:ie,convertStr:ee,convertFile:be,convertStream:X},T7}var dta=uta();const pta=Vr(dta);function hta(e){return e.paths||(e.paths={}),new Promise((a,t)=>pta.convertObj(e,{patch:!0,warnOnly:!0,text:"{}",anchors:!0},(r,n)=>{if(r)return t(r);a(n?.openapi)}))}async function mta(){try{return(await ate())?.resolvedConfig.openapi||{}}catch{return{}}}async function fta(e){const a=await ate(),t={config:a,base:Uc?window.location.origin:typeof globalThis.process<"u"?globalThis.process.cwd():""};Uc&&(a.resolve.http.customFetch=globalThis.fetch),typeof e=="object"&&e!==null?t.doc=gta(e):t.ref=e;const{bundle:{parsed:r}}=await Eaa(t);return r.swagger!==void 0?hta(r):r}function gta(e){return{source:{absoluteRef:""},parsed:e}}async function vta(e,a,t){let r;if(t?.skipBundle){if(!e)throw new Error('spec must be specified when using "skipBundleAndConvert"');r=e}else r=await fta(e||a);try{UFe(r)}catch{}return r}const bta=({options:e,definitionUrl:a,definition:t,activeSampleLanguage:r,children:n})=>{const[i,o]=R.useState(),[s,l]=R.useState(!0),[c,u]=R.useState(null),[d,p]=R.useState(e||{});R.useEffect(()=>{async function g(){l(!0);try{const b=await mta();p({...e,...b}),u(await vta(t,a,e))}catch(b){o(b.message)}}g()},[t,a,e]);const m=R.useMemo(()=>{if(c)return{definition:c,options:d,definitionUrl:a,activeSampleLanguage:r}},WFe([c,a,d]));return R.useEffect(()=>{m&&l(!1)},[m]),i||!m?null:s?Xs(e?.hideLoading,!1)?null:h.jsx(QZe,{color:"--loading-spinner-color"}):R.isValidElement(n)?R.cloneElement(n,{store:m}):null};function yta({definition:e,definitionUrl:a,options:t={},activeItemId:r,activeSampleLanguage:n,activeDeepLink:i,router:o}){return h.jsx(bta,{definition:e,definitionUrl:a,options:t,activeItemId:r,activeSampleLanguage:n,activeDeepLink:i,children:h.jsx(See,{withCommonStyles:!0,router:o||"hash"})})}function kta(e){const a={},t=e.attributes;for(let r=0;r<t.length;r++){const n=t[r];a[n.name]=n.value}return a}function xta(e){const a=kta(e),t={};for(const r in a){const n=r.replace(/-(.)/g,(i,o)=>o.toUpperCase());t[n]=a[r]}return t}function wta(e,a=document.querySelector("redoc")){aG.hydrateRoot(a,h.jsx(See,{store:e}),{onRecoverableError:(t,r)=>{t.message.includes("Minified React error #418")||console.error(t.message,r)}})}function gre(e,a={},t=O4("redoc")){if(t===null)throw new Error('"element" argument is not provided and <redoc> tag is not found on the page');const{router:r,...n}={...a,...xta(t)};let i,o;typeof e=="string"?i=e:typeof e=="object"&&(o=e),aG.createRoot(t).render(R.createElement(yta,{definition:o,definitionUrl:i,options:n,router:r??"hash"},["Loading..."]))}const zta="3.16.0-next.0",Sta="a4c41f6b";function Cta(){const e=O4("redoc");if(!e)return;const a=e.getAttribute("spec-url");a&&gre(a,{},e)}Cta();function p1(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var vre={exports:{}};/*!
|
|
10277
|
+
*/var Ete;function d1(){return Ete||(Ete=1,(function(e){const a=Uaa(),t=Waa(),r=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;e.Buffer=s,e.SlowBuffer=k,e.INSPECT_MAX_BYTES=50;const n=2147483647;e.kMaxLength=n,s.TYPED_ARRAY_SUPPORT=i(),!s.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function i(){try{const E=new Uint8Array(1),ae={foo:function(){return 42}};return Object.setPrototypeOf(ae,Uint8Array.prototype),Object.setPrototypeOf(E,ae),E.foo()===42}catch{return!1}}Object.defineProperty(s.prototype,"parent",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.buffer}}),Object.defineProperty(s.prototype,"offset",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.byteOffset}});function o(E){if(E>n)throw new RangeError('The value "'+E+'" is invalid for option "size"');const ae=new Uint8Array(E);return Object.setPrototypeOf(ae,s.prototype),ae}function s(E,ae,le){if(typeof E=="number"){if(typeof ae=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return d(E)}return l(E,ae,le)}s.poolSize=8192;function l(E,ae,le){if(typeof E=="string")return p(E,ae);if(ArrayBuffer.isView(E))return g(E);if(E==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof E);if(he(E,ArrayBuffer)||E&&he(E.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(he(E,SharedArrayBuffer)||E&&he(E.buffer,SharedArrayBuffer)))return b(E,ae,le);if(typeof E=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const Ce=E.valueOf&&E.valueOf();if(Ce!=null&&Ce!==E)return s.from(Ce,ae,le);const Me=y(E);if(Me)return Me;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof E[Symbol.toPrimitive]=="function")return s.from(E[Symbol.toPrimitive]("string"),ae,le);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof E)}s.from=function(E,ae,le){return l(E,ae,le)},Object.setPrototypeOf(s.prototype,Uint8Array.prototype),Object.setPrototypeOf(s,Uint8Array);function c(E){if(typeof E!="number")throw new TypeError('"size" argument must be of type number');if(E<0)throw new RangeError('The value "'+E+'" is invalid for option "size"')}function u(E,ae,le){return c(E),E<=0?o(E):ae!==void 0?typeof le=="string"?o(E).fill(ae,le):o(E).fill(ae):o(E)}s.alloc=function(E,ae,le){return u(E,ae,le)};function d(E){return c(E),o(E<0?0:v(E)|0)}s.allocUnsafe=function(E){return d(E)},s.allocUnsafeSlow=function(E){return d(E)};function p(E,ae){if((typeof ae!="string"||ae==="")&&(ae="utf8"),!s.isEncoding(ae))throw new TypeError("Unknown encoding: "+ae);const le=z(E,ae)|0;let Ce=o(le);const Me=Ce.write(E,ae);return Me!==le&&(Ce=Ce.slice(0,Me)),Ce}function m(E){const ae=E.length<0?0:v(E.length)|0,le=o(ae);for(let Ce=0;Ce<ae;Ce+=1)le[Ce]=E[Ce]&255;return le}function g(E){if(he(E,Uint8Array)){const ae=new Uint8Array(E);return b(ae.buffer,ae.byteOffset,ae.byteLength)}return m(E)}function b(E,ae,le){if(ae<0||E.byteLength<ae)throw new RangeError('"offset" is outside of buffer bounds');if(E.byteLength<ae+(le||0))throw new RangeError('"length" is outside of buffer bounds');let Ce;return ae===void 0&&le===void 0?Ce=new Uint8Array(E):le===void 0?Ce=new Uint8Array(E,ae):Ce=new Uint8Array(E,ae,le),Object.setPrototypeOf(Ce,s.prototype),Ce}function y(E){if(s.isBuffer(E)){const ae=v(E.length)|0,le=o(ae);return le.length===0||E.copy(le,0,0,ae),le}if(E.length!==void 0)return typeof E.length!="number"||xe(E.length)?o(0):m(E);if(E.type==="Buffer"&&Array.isArray(E.data))return m(E.data)}function v(E){if(E>=n)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+n.toString(16)+" bytes");return E|0}function k(E){return+E!=E&&(E=0),s.alloc(+E)}s.isBuffer=function(E){return E!=null&&E._isBuffer===!0&&E!==s.prototype},s.compare=function(E,ae){if(he(E,Uint8Array)&&(E=s.from(E,E.offset,E.byteLength)),he(ae,Uint8Array)&&(ae=s.from(ae,ae.offset,ae.byteLength)),!s.isBuffer(E)||!s.isBuffer(ae))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(E===ae)return 0;let le=E.length,Ce=ae.length;for(let Me=0,Te=Math.min(le,Ce);Me<Te;++Me)if(E[Me]!==ae[Me]){le=E[Me],Ce=ae[Me];break}return le<Ce?-1:Ce<le?1:0},s.isEncoding=function(E){switch(String(E).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},s.concat=function(E,ae){if(!Array.isArray(E))throw new TypeError('"list" argument must be an Array of Buffers');if(E.length===0)return s.alloc(0);let le;if(ae===void 0)for(ae=0,le=0;le<E.length;++le)ae+=E[le].length;const Ce=s.allocUnsafe(ae);let Me=0;for(le=0;le<E.length;++le){let Te=E[le];if(he(Te,Uint8Array))Me+Te.length>Ce.length?(s.isBuffer(Te)||(Te=s.from(Te)),Te.copy(Ce,Me)):Uint8Array.prototype.set.call(Ce,Te,Me);else if(s.isBuffer(Te))Te.copy(Ce,Me);else throw new TypeError('"list" argument must be an Array of Buffers');Me+=Te.length}return Ce};function z(E,ae){if(s.isBuffer(E))return E.length;if(ArrayBuffer.isView(E)||he(E,ArrayBuffer))return E.byteLength;if(typeof E!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof E);const le=E.length,Ce=arguments.length>2&&arguments[2]===!0;if(!Ce&&le===0)return 0;let Me=!1;for(;;)switch(ae){case"ascii":case"latin1":case"binary":return le;case"utf8":case"utf-8":return Q(E).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return le*2;case"hex":return le>>>1;case"base64":return fe(E).length;default:if(Me)return Ce?-1:Q(E).length;ae=(""+ae).toLowerCase(),Me=!0}}s.byteLength=z;function C(E,ae,le){let Ce=!1;if((ae===void 0||ae<0)&&(ae=0),ae>this.length||((le===void 0||le>this.length)&&(le=this.length),le<=0)||(le>>>=0,ae>>>=0,le<=ae))return"";for(E||(E="utf8");;)switch(E){case"hex":return me(this,ae,le);case"utf8":case"utf-8":return D(this,ae,le);case"ascii":return ue(this,ae,le);case"latin1":case"binary":return ne(this,ae,le);case"base64":return U(this,ae,le);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return I(this,ae,le);default:if(Ce)throw new TypeError("Unknown encoding: "+E);E=(E+"").toLowerCase(),Ce=!0}}s.prototype._isBuffer=!0;function w(E,ae,le){const Ce=E[ae];E[ae]=E[le],E[le]=Ce}s.prototype.swap16=function(){const E=this.length;if(E%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let ae=0;ae<E;ae+=2)w(this,ae,ae+1);return this},s.prototype.swap32=function(){const E=this.length;if(E%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let ae=0;ae<E;ae+=4)w(this,ae,ae+3),w(this,ae+1,ae+2);return this},s.prototype.swap64=function(){const E=this.length;if(E%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let ae=0;ae<E;ae+=8)w(this,ae,ae+7),w(this,ae+1,ae+6),w(this,ae+2,ae+5),w(this,ae+3,ae+4);return this},s.prototype.toString=function(){const E=this.length;return E===0?"":arguments.length===0?D(this,0,E):C.apply(this,arguments)},s.prototype.toLocaleString=s.prototype.toString,s.prototype.equals=function(E){if(!s.isBuffer(E))throw new TypeError("Argument must be a Buffer");return this===E?!0:s.compare(this,E)===0},s.prototype.inspect=function(){let E="";const ae=e.INSPECT_MAX_BYTES;return E=this.toString("hex",0,ae).replace(/(.{2})/g,"$1 ").trim(),this.length>ae&&(E+=" ... "),"<Buffer "+E+">"},r&&(s.prototype[r]=s.prototype.inspect),s.prototype.compare=function(E,ae,le,Ce,Me){if(he(E,Uint8Array)&&(E=s.from(E,E.offset,E.byteLength)),!s.isBuffer(E))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof E);if(ae===void 0&&(ae=0),le===void 0&&(le=E?E.length:0),Ce===void 0&&(Ce=0),Me===void 0&&(Me=this.length),ae<0||le>E.length||Ce<0||Me>this.length)throw new RangeError("out of range index");if(Ce>=Me&&ae>=le)return 0;if(Ce>=Me)return-1;if(ae>=le)return 1;if(ae>>>=0,le>>>=0,Ce>>>=0,Me>>>=0,this===E)return 0;let Te=Me-Ce,De=le-ae;const ra=Math.min(Te,De),pa=this.slice(Ce,Me),va=E.slice(ae,le);for(let sa=0;sa<ra;++sa)if(pa[sa]!==va[sa]){Te=pa[sa],De=va[sa];break}return Te<De?-1:De<Te?1:0};function S(E,ae,le,Ce,Me){if(E.length===0)return-1;if(typeof le=="string"?(Ce=le,le=0):le>2147483647?le=2147483647:le<-2147483648&&(le=-2147483648),le=+le,xe(le)&&(le=Me?0:E.length-1),le<0&&(le=E.length+le),le>=E.length){if(Me)return-1;le=E.length-1}else if(le<0)if(Me)le=0;else return-1;if(typeof ae=="string"&&(ae=s.from(ae,Ce)),s.isBuffer(ae))return ae.length===0?-1:O(E,ae,le,Ce,Me);if(typeof ae=="number")return ae=ae&255,typeof Uint8Array.prototype.indexOf=="function"?Me?Uint8Array.prototype.indexOf.call(E,ae,le):Uint8Array.prototype.lastIndexOf.call(E,ae,le):O(E,[ae],le,Ce,Me);throw new TypeError("val must be string, number or Buffer")}function O(E,ae,le,Ce,Me){let Te=1,De=E.length,ra=ae.length;if(Ce!==void 0&&(Ce=String(Ce).toLowerCase(),Ce==="ucs2"||Ce==="ucs-2"||Ce==="utf16le"||Ce==="utf-16le")){if(E.length<2||ae.length<2)return-1;Te=2,De/=2,ra/=2,le/=2}function pa(sa,ka){return Te===1?sa[ka]:sa.readUInt16BE(ka*Te)}let va;if(Me){let sa=-1;for(va=le;va<De;va++)if(pa(E,va)===pa(ae,sa===-1?0:va-sa)){if(sa===-1&&(sa=va),va-sa+1===ra)return sa*Te}else sa!==-1&&(va-=va-sa),sa=-1}else for(le+ra>De&&(le=De-ra),va=le;va>=0;va--){let sa=!0;for(let ka=0;ka<ra;ka++)if(pa(E,va+ka)!==pa(ae,ka)){sa=!1;break}if(sa)return va}return-1}s.prototype.includes=function(E,ae,le){return this.indexOf(E,ae,le)!==-1},s.prototype.indexOf=function(E,ae,le){return S(this,E,ae,le,!0)},s.prototype.lastIndexOf=function(E,ae,le){return S(this,E,ae,le,!1)};function A(E,ae,le,Ce){le=Number(le)||0;const Me=E.length-le;Ce?(Ce=Number(Ce),Ce>Me&&(Ce=Me)):Ce=Me;const Te=ae.length;Ce>Te/2&&(Ce=Te/2);let De;for(De=0;De<Ce;++De){const ra=parseInt(ae.substr(De*2,2),16);if(xe(ra))return De;E[le+De]=ra}return De}function B(E,ae,le,Ce){return ge(Q(ae,E.length-le),E,le,Ce)}function L(E,ae,le,Ce){return ge(re(ae),E,le,Ce)}function q(E,ae,le,Ce){return ge(fe(ae),E,le,Ce)}function N(E,ae,le,Ce){return ge(de(ae,E.length-le),E,le,Ce)}s.prototype.write=function(E,ae,le,Ce){if(ae===void 0)Ce="utf8",le=this.length,ae=0;else if(le===void 0&&typeof ae=="string")Ce=ae,le=this.length,ae=0;else if(isFinite(ae))ae=ae>>>0,isFinite(le)?(le=le>>>0,Ce===void 0&&(Ce="utf8")):(Ce=le,le=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const Me=this.length-ae;if((le===void 0||le>Me)&&(le=Me),E.length>0&&(le<0||ae<0)||ae>this.length)throw new RangeError("Attempt to write outside buffer bounds");Ce||(Ce="utf8");let Te=!1;for(;;)switch(Ce){case"hex":return A(this,E,ae,le);case"utf8":case"utf-8":return B(this,E,ae,le);case"ascii":case"latin1":case"binary":return L(this,E,ae,le);case"base64":return q(this,E,ae,le);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return N(this,E,ae,le);default:if(Te)throw new TypeError("Unknown encoding: "+Ce);Ce=(""+Ce).toLowerCase(),Te=!0}},s.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function U(E,ae,le){return ae===0&&le===E.length?a.fromByteArray(E):a.fromByteArray(E.slice(ae,le))}function D(E,ae,le){le=Math.min(E.length,le);const Ce=[];let Me=ae;for(;Me<le;){const Te=E[Me];let De=null,ra=Te>239?4:Te>223?3:Te>191?2:1;if(Me+ra<=le){let pa,va,sa,ka;switch(ra){case 1:Te<128&&(De=Te);break;case 2:pa=E[Me+1],(pa&192)===128&&(ka=(Te&31)<<6|pa&63,ka>127&&(De=ka));break;case 3:pa=E[Me+1],va=E[Me+2],(pa&192)===128&&(va&192)===128&&(ka=(Te&15)<<12|(pa&63)<<6|va&63,ka>2047&&(ka<55296||ka>57343)&&(De=ka));break;case 4:pa=E[Me+1],va=E[Me+2],sa=E[Me+3],(pa&192)===128&&(va&192)===128&&(sa&192)===128&&(ka=(Te&15)<<18|(pa&63)<<12|(va&63)<<6|sa&63,ka>65535&&ka<1114112&&(De=ka))}}De===null?(De=65533,ra=1):De>65535&&(De-=65536,Ce.push(De>>>10&1023|55296),De=56320|De&1023),Ce.push(De),Me+=ra}return te(Ce)}const Y=4096;function te(E){const ae=E.length;if(ae<=Y)return String.fromCharCode.apply(String,E);let le="",Ce=0;for(;Ce<ae;)le+=String.fromCharCode.apply(String,E.slice(Ce,Ce+=Y));return le}function ue(E,ae,le){let Ce="";le=Math.min(E.length,le);for(let Me=ae;Me<le;++Me)Ce+=String.fromCharCode(E[Me]&127);return Ce}function ne(E,ae,le){let Ce="";le=Math.min(E.length,le);for(let Me=ae;Me<le;++Me)Ce+=String.fromCharCode(E[Me]);return Ce}function me(E,ae,le){const Ce=E.length;(!ae||ae<0)&&(ae=0),(!le||le<0||le>Ce)&&(le=Ce);let Me="";for(let Te=ae;Te<le;++Te)Me+=Oe[E[Te]];return Me}function I(E,ae,le){const Ce=E.slice(ae,le);let Me="";for(let Te=0;Te<Ce.length-1;Te+=2)Me+=String.fromCharCode(Ce[Te]+Ce[Te+1]*256);return Me}s.prototype.slice=function(E,ae){const le=this.length;E=~~E,ae=ae===void 0?le:~~ae,E<0?(E+=le,E<0&&(E=0)):E>le&&(E=le),ae<0?(ae+=le,ae<0&&(ae=0)):ae>le&&(ae=le),ae<E&&(ae=E);const Ce=this.subarray(E,ae);return Object.setPrototypeOf(Ce,s.prototype),Ce};function K(E,ae,le){if(E%1!==0||E<0)throw new RangeError("offset is not uint");if(E+ae>le)throw new RangeError("Trying to access beyond buffer length")}s.prototype.readUintLE=s.prototype.readUIntLE=function(E,ae,le){E=E>>>0,ae=ae>>>0,le||K(E,ae,this.length);let Ce=this[E],Me=1,Te=0;for(;++Te<ae&&(Me*=256);)Ce+=this[E+Te]*Me;return Ce},s.prototype.readUintBE=s.prototype.readUIntBE=function(E,ae,le){E=E>>>0,ae=ae>>>0,le||K(E,ae,this.length);let Ce=this[E+--ae],Me=1;for(;ae>0&&(Me*=256);)Ce+=this[E+--ae]*Me;return Ce},s.prototype.readUint8=s.prototype.readUInt8=function(E,ae){return E=E>>>0,ae||K(E,1,this.length),this[E]},s.prototype.readUint16LE=s.prototype.readUInt16LE=function(E,ae){return E=E>>>0,ae||K(E,2,this.length),this[E]|this[E+1]<<8},s.prototype.readUint16BE=s.prototype.readUInt16BE=function(E,ae){return E=E>>>0,ae||K(E,2,this.length),this[E]<<8|this[E+1]},s.prototype.readUint32LE=s.prototype.readUInt32LE=function(E,ae){return E=E>>>0,ae||K(E,4,this.length),(this[E]|this[E+1]<<8|this[E+2]<<16)+this[E+3]*16777216},s.prototype.readUint32BE=s.prototype.readUInt32BE=function(E,ae){return E=E>>>0,ae||K(E,4,this.length),this[E]*16777216+(this[E+1]<<16|this[E+2]<<8|this[E+3])},s.prototype.readBigUInt64LE=_e(function(E){E=E>>>0,oe(E,"offset");const ae=this[E],le=this[E+7];(ae===void 0||le===void 0)&&G(E,this.length-8);const Ce=ae+this[++E]*2**8+this[++E]*2**16+this[++E]*2**24,Me=this[++E]+this[++E]*2**8+this[++E]*2**16+le*2**24;return BigInt(Ce)+(BigInt(Me)<<BigInt(32))}),s.prototype.readBigUInt64BE=_e(function(E){E=E>>>0,oe(E,"offset");const ae=this[E],le=this[E+7];(ae===void 0||le===void 0)&&G(E,this.length-8);const Ce=ae*2**24+this[++E]*2**16+this[++E]*2**8+this[++E],Me=this[++E]*2**24+this[++E]*2**16+this[++E]*2**8+le;return(BigInt(Ce)<<BigInt(32))+BigInt(Me)}),s.prototype.readIntLE=function(E,ae,le){E=E>>>0,ae=ae>>>0,le||K(E,ae,this.length);let Ce=this[E],Me=1,Te=0;for(;++Te<ae&&(Me*=256);)Ce+=this[E+Te]*Me;return Me*=128,Ce>=Me&&(Ce-=Math.pow(2,8*ae)),Ce},s.prototype.readIntBE=function(E,ae,le){E=E>>>0,ae=ae>>>0,le||K(E,ae,this.length);let Ce=ae,Me=1,Te=this[E+--Ce];for(;Ce>0&&(Me*=256);)Te+=this[E+--Ce]*Me;return Me*=128,Te>=Me&&(Te-=Math.pow(2,8*ae)),Te},s.prototype.readInt8=function(E,ae){return E=E>>>0,ae||K(E,1,this.length),this[E]&128?(255-this[E]+1)*-1:this[E]},s.prototype.readInt16LE=function(E,ae){E=E>>>0,ae||K(E,2,this.length);const le=this[E]|this[E+1]<<8;return le&32768?le|4294901760:le},s.prototype.readInt16BE=function(E,ae){E=E>>>0,ae||K(E,2,this.length);const le=this[E+1]|this[E]<<8;return le&32768?le|4294901760:le},s.prototype.readInt32LE=function(E,ae){return E=E>>>0,ae||K(E,4,this.length),this[E]|this[E+1]<<8|this[E+2]<<16|this[E+3]<<24},s.prototype.readInt32BE=function(E,ae){return E=E>>>0,ae||K(E,4,this.length),this[E]<<24|this[E+1]<<16|this[E+2]<<8|this[E+3]},s.prototype.readBigInt64LE=_e(function(E){E=E>>>0,oe(E,"offset");const ae=this[E],le=this[E+7];(ae===void 0||le===void 0)&&G(E,this.length-8);const Ce=this[E+4]+this[E+5]*2**8+this[E+6]*2**16+(le<<24);return(BigInt(Ce)<<BigInt(32))+BigInt(ae+this[++E]*2**8+this[++E]*2**16+this[++E]*2**24)}),s.prototype.readBigInt64BE=_e(function(E){E=E>>>0,oe(E,"offset");const ae=this[E],le=this[E+7];(ae===void 0||le===void 0)&&G(E,this.length-8);const Ce=(ae<<24)+this[++E]*2**16+this[++E]*2**8+this[++E];return(BigInt(Ce)<<BigInt(32))+BigInt(this[++E]*2**24+this[++E]*2**16+this[++E]*2**8+le)}),s.prototype.readFloatLE=function(E,ae){return E=E>>>0,ae||K(E,4,this.length),t.read(this,E,!0,23,4)},s.prototype.readFloatBE=function(E,ae){return E=E>>>0,ae||K(E,4,this.length),t.read(this,E,!1,23,4)},s.prototype.readDoubleLE=function(E,ae){return E=E>>>0,ae||K(E,8,this.length),t.read(this,E,!0,52,8)},s.prototype.readDoubleBE=function(E,ae){return E=E>>>0,ae||K(E,8,this.length),t.read(this,E,!1,52,8)};function W(E,ae,le,Ce,Me,Te){if(!s.isBuffer(E))throw new TypeError('"buffer" argument must be a Buffer instance');if(ae>Me||ae<Te)throw new RangeError('"value" argument is out of bounds');if(le+Ce>E.length)throw new RangeError("Index out of range")}s.prototype.writeUintLE=s.prototype.writeUIntLE=function(E,ae,le,Ce){if(E=+E,ae=ae>>>0,le=le>>>0,!Ce){const De=Math.pow(2,8*le)-1;W(this,E,ae,le,De,0)}let Me=1,Te=0;for(this[ae]=E&255;++Te<le&&(Me*=256);)this[ae+Te]=E/Me&255;return ae+le},s.prototype.writeUintBE=s.prototype.writeUIntBE=function(E,ae,le,Ce){if(E=+E,ae=ae>>>0,le=le>>>0,!Ce){const De=Math.pow(2,8*le)-1;W(this,E,ae,le,De,0)}let Me=le-1,Te=1;for(this[ae+Me]=E&255;--Me>=0&&(Te*=256);)this[ae+Me]=E/Te&255;return ae+le},s.prototype.writeUint8=s.prototype.writeUInt8=function(E,ae,le){return E=+E,ae=ae>>>0,le||W(this,E,ae,1,255,0),this[ae]=E&255,ae+1},s.prototype.writeUint16LE=s.prototype.writeUInt16LE=function(E,ae,le){return E=+E,ae=ae>>>0,le||W(this,E,ae,2,65535,0),this[ae]=E&255,this[ae+1]=E>>>8,ae+2},s.prototype.writeUint16BE=s.prototype.writeUInt16BE=function(E,ae,le){return E=+E,ae=ae>>>0,le||W(this,E,ae,2,65535,0),this[ae]=E>>>8,this[ae+1]=E&255,ae+2},s.prototype.writeUint32LE=s.prototype.writeUInt32LE=function(E,ae,le){return E=+E,ae=ae>>>0,le||W(this,E,ae,4,4294967295,0),this[ae+3]=E>>>24,this[ae+2]=E>>>16,this[ae+1]=E>>>8,this[ae]=E&255,ae+4},s.prototype.writeUint32BE=s.prototype.writeUInt32BE=function(E,ae,le){return E=+E,ae=ae>>>0,le||W(this,E,ae,4,4294967295,0),this[ae]=E>>>24,this[ae+1]=E>>>16,this[ae+2]=E>>>8,this[ae+3]=E&255,ae+4};function V(E,ae,le,Ce,Me){$(ae,Ce,Me,E,le,7);let Te=Number(ae&BigInt(4294967295));E[le++]=Te,Te=Te>>8,E[le++]=Te,Te=Te>>8,E[le++]=Te,Te=Te>>8,E[le++]=Te;let De=Number(ae>>BigInt(32)&BigInt(4294967295));return E[le++]=De,De=De>>8,E[le++]=De,De=De>>8,E[le++]=De,De=De>>8,E[le++]=De,le}function P(E,ae,le,Ce,Me){$(ae,Ce,Me,E,le,7);let Te=Number(ae&BigInt(4294967295));E[le+7]=Te,Te=Te>>8,E[le+6]=Te,Te=Te>>8,E[le+5]=Te,Te=Te>>8,E[le+4]=Te;let De=Number(ae>>BigInt(32)&BigInt(4294967295));return E[le+3]=De,De=De>>8,E[le+2]=De,De=De>>8,E[le+1]=De,De=De>>8,E[le]=De,le+8}s.prototype.writeBigUInt64LE=_e(function(E,ae=0){return V(this,E,ae,BigInt(0),BigInt("0xffffffffffffffff"))}),s.prototype.writeBigUInt64BE=_e(function(E,ae=0){return P(this,E,ae,BigInt(0),BigInt("0xffffffffffffffff"))}),s.prototype.writeIntLE=function(E,ae,le,Ce){if(E=+E,ae=ae>>>0,!Ce){const ra=Math.pow(2,8*le-1);W(this,E,ae,le,ra-1,-ra)}let Me=0,Te=1,De=0;for(this[ae]=E&255;++Me<le&&(Te*=256);)E<0&&De===0&&this[ae+Me-1]!==0&&(De=1),this[ae+Me]=(E/Te>>0)-De&255;return ae+le},s.prototype.writeIntBE=function(E,ae,le,Ce){if(E=+E,ae=ae>>>0,!Ce){const ra=Math.pow(2,8*le-1);W(this,E,ae,le,ra-1,-ra)}let Me=le-1,Te=1,De=0;for(this[ae+Me]=E&255;--Me>=0&&(Te*=256);)E<0&&De===0&&this[ae+Me+1]!==0&&(De=1),this[ae+Me]=(E/Te>>0)-De&255;return ae+le},s.prototype.writeInt8=function(E,ae,le){return E=+E,ae=ae>>>0,le||W(this,E,ae,1,127,-128),E<0&&(E=255+E+1),this[ae]=E&255,ae+1},s.prototype.writeInt16LE=function(E,ae,le){return E=+E,ae=ae>>>0,le||W(this,E,ae,2,32767,-32768),this[ae]=E&255,this[ae+1]=E>>>8,ae+2},s.prototype.writeInt16BE=function(E,ae,le){return E=+E,ae=ae>>>0,le||W(this,E,ae,2,32767,-32768),this[ae]=E>>>8,this[ae+1]=E&255,ae+2},s.prototype.writeInt32LE=function(E,ae,le){return E=+E,ae=ae>>>0,le||W(this,E,ae,4,2147483647,-2147483648),this[ae]=E&255,this[ae+1]=E>>>8,this[ae+2]=E>>>16,this[ae+3]=E>>>24,ae+4},s.prototype.writeInt32BE=function(E,ae,le){return E=+E,ae=ae>>>0,le||W(this,E,ae,4,2147483647,-2147483648),E<0&&(E=4294967295+E+1),this[ae]=E>>>24,this[ae+1]=E>>>16,this[ae+2]=E>>>8,this[ae+3]=E&255,ae+4},s.prototype.writeBigInt64LE=_e(function(E,ae=0){return V(this,E,ae,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),s.prototype.writeBigInt64BE=_e(function(E,ae=0){return P(this,E,ae,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function _(E,ae,le,Ce,Me,Te){if(le+Ce>E.length)throw new RangeError("Index out of range");if(le<0)throw new RangeError("Index out of range")}function F(E,ae,le,Ce,Me){return ae=+ae,le=le>>>0,Me||_(E,ae,le,4),t.write(E,ae,le,Ce,23,4),le+4}s.prototype.writeFloatLE=function(E,ae,le){return F(this,E,ae,!0,le)},s.prototype.writeFloatBE=function(E,ae,le){return F(this,E,ae,!1,le)};function ee(E,ae,le,Ce,Me){return ae=+ae,le=le>>>0,Me||_(E,ae,le,8),t.write(E,ae,le,Ce,52,8),le+8}s.prototype.writeDoubleLE=function(E,ae,le){return ee(this,E,ae,!0,le)},s.prototype.writeDoubleBE=function(E,ae,le){return ee(this,E,ae,!1,le)},s.prototype.copy=function(E,ae,le,Ce){if(!s.isBuffer(E))throw new TypeError("argument should be a Buffer");if(le||(le=0),!Ce&&Ce!==0&&(Ce=this.length),ae>=E.length&&(ae=E.length),ae||(ae=0),Ce>0&&Ce<le&&(Ce=le),Ce===le||E.length===0||this.length===0)return 0;if(ae<0)throw new RangeError("targetStart out of bounds");if(le<0||le>=this.length)throw new RangeError("Index out of range");if(Ce<0)throw new RangeError("sourceEnd out of bounds");Ce>this.length&&(Ce=this.length),E.length-ae<Ce-le&&(Ce=E.length-ae+le);const Me=Ce-le;return this===E&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(ae,le,Ce):Uint8Array.prototype.set.call(E,this.subarray(le,Ce),ae),Me},s.prototype.fill=function(E,ae,le,Ce){if(typeof E=="string"){if(typeof ae=="string"?(Ce=ae,ae=0,le=this.length):typeof le=="string"&&(Ce=le,le=this.length),Ce!==void 0&&typeof Ce!="string")throw new TypeError("encoding must be a string");if(typeof Ce=="string"&&!s.isEncoding(Ce))throw new TypeError("Unknown encoding: "+Ce);if(E.length===1){const Te=E.charCodeAt(0);(Ce==="utf8"&&Te<128||Ce==="latin1")&&(E=Te)}}else typeof E=="number"?E=E&255:typeof E=="boolean"&&(E=Number(E));if(ae<0||this.length<ae||this.length<le)throw new RangeError("Out of range index");if(le<=ae)return this;ae=ae>>>0,le=le===void 0?this.length:le>>>0,E||(E=0);let Me;if(typeof E=="number")for(Me=ae;Me<le;++Me)this[Me]=E;else{const Te=s.isBuffer(E)?E:s.from(E,Ce),De=Te.length;if(De===0)throw new TypeError('The value "'+E+'" is invalid for argument "value"');for(Me=0;Me<le-ae;++Me)this[Me+ae]=Te[Me%De]}return this};const ie={};function be(E,ae,le){ie[E]=class extends le{constructor(){super(),Object.defineProperty(this,"message",{value:ae.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${E}]`,delete this.name}get code(){return E}set code(Ce){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:Ce,writable:!0})}toString(){return`${this.name} [${E}]: ${this.message}`}}}be("ERR_BUFFER_OUT_OF_BOUNDS",function(E){return E?`${E} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),be("ERR_INVALID_ARG_TYPE",function(E,ae){return`The "${E}" argument must be of type number. Received type ${typeof ae}`},TypeError),be("ERR_OUT_OF_RANGE",function(E,ae,le){let Ce=`The value of "${E}" is out of range.`,Me=le;return Number.isInteger(le)&&Math.abs(le)>2**32?Me=X(String(le)):typeof le=="bigint"&&(Me=String(le),(le>BigInt(2)**BigInt(32)||le<-(BigInt(2)**BigInt(32)))&&(Me=X(Me)),Me+="n"),Ce+=` It must be ${ae}. Received ${Me}`,Ce},RangeError);function X(E){let ae="",le=E.length;const Ce=E[0]==="-"?1:0;for(;le>=Ce+4;le-=3)ae=`_${E.slice(le-3,le)}${ae}`;return`${E.slice(0,le)}${ae}`}function M(E,ae,le){oe(ae,"offset"),(E[ae]===void 0||E[ae+le]===void 0)&&G(ae,E.length-(le+1))}function $(E,ae,le,Ce,Me,Te){if(E>le||E<ae){const De=typeof ae=="bigint"?"n":"";let ra;throw ae===0||ae===BigInt(0)?ra=`>= 0${De} and < 2${De} ** ${(Te+1)*8}${De}`:ra=`>= -(2${De} ** ${(Te+1)*8-1}${De}) and < 2 ** ${(Te+1)*8-1}${De}`,new ie.ERR_OUT_OF_RANGE("value",ra,E)}M(Ce,Me,Te)}function oe(E,ae){if(typeof E!="number")throw new ie.ERR_INVALID_ARG_TYPE(ae,"number",E)}function G(E,ae,le){throw Math.floor(E)!==E?(oe(E,le),new ie.ERR_OUT_OF_RANGE("offset","an integer",E)):ae<0?new ie.ERR_BUFFER_OUT_OF_BOUNDS:new ie.ERR_OUT_OF_RANGE("offset",`>= 0 and <= ${ae}`,E)}const ce=/[^+/0-9A-Za-z-_]/g;function pe(E){if(E=E.split("=")[0],E=E.trim().replace(ce,""),E.length<2)return"";for(;E.length%4!==0;)E=E+"=";return E}function Q(E,ae){ae=ae||1/0;let le;const Ce=E.length;let Me=null;const Te=[];for(let De=0;De<Ce;++De){if(le=E.charCodeAt(De),le>55295&&le<57344){if(!Me){if(le>56319){(ae-=3)>-1&&Te.push(239,191,189);continue}else if(De+1===Ce){(ae-=3)>-1&&Te.push(239,191,189);continue}Me=le;continue}if(le<56320){(ae-=3)>-1&&Te.push(239,191,189),Me=le;continue}le=(Me-55296<<10|le-56320)+65536}else Me&&(ae-=3)>-1&&Te.push(239,191,189);if(Me=null,le<128){if((ae-=1)<0)break;Te.push(le)}else if(le<2048){if((ae-=2)<0)break;Te.push(le>>6|192,le&63|128)}else if(le<65536){if((ae-=3)<0)break;Te.push(le>>12|224,le>>6&63|128,le&63|128)}else if(le<1114112){if((ae-=4)<0)break;Te.push(le>>18|240,le>>12&63|128,le>>6&63|128,le&63|128)}else throw new Error("Invalid code point")}return Te}function re(E){const ae=[];for(let le=0;le<E.length;++le)ae.push(E.charCodeAt(le)&255);return ae}function de(E,ae){let le,Ce,Me;const Te=[];for(let De=0;De<E.length&&!((ae-=2)<0);++De)le=E.charCodeAt(De),Ce=le>>8,Me=le%256,Te.push(Me),Te.push(Ce);return Te}function fe(E){return a.toByteArray(pe(E))}function ge(E,ae,le,Ce){let Me;for(Me=0;Me<Ce&&!(Me+le>=ae.length||Me>=E.length);++Me)ae[Me+le]=E[Me];return Me}function he(E,ae){return E instanceof ae||E!=null&&E.constructor!=null&&E.constructor.name!=null&&E.constructor.name===ae.name}function xe(E){return E!==E}const Oe=(function(){const E="0123456789abcdef",ae=new Array(256);for(let le=0;le<16;++le){const Ce=le*16;for(let Me=0;Me<16;++Me)ae[Ce+Me]=E[le]+E[Me]}return ae})();function _e(E){return typeof BigInt>"u"?Ye:E}function Ye(){throw new Error("BigInt not supported")}})(Mte)),Mte}const _te=$F(jee);var m7,Lte;function Zaa(){if(Lte)return m7;Lte=1;function e(g,b){var y=Object.keys(g);if(Object.getOwnPropertySymbols){var v=Object.getOwnPropertySymbols(g);b&&(v=v.filter(function(k){return Object.getOwnPropertyDescriptor(g,k).enumerable})),y.push.apply(y,v)}return y}function a(g){for(var b=1;b<arguments.length;b++){var y=arguments[b]!=null?arguments[b]:{};b%2?e(Object(y),!0).forEach(function(v){t(g,v,y[v])}):Object.getOwnPropertyDescriptors?Object.defineProperties(g,Object.getOwnPropertyDescriptors(y)):e(Object(y)).forEach(function(v){Object.defineProperty(g,v,Object.getOwnPropertyDescriptor(y,v))})}return g}function t(g,b,y){return b=o(b),b in g?Object.defineProperty(g,b,{value:y,enumerable:!0,configurable:!0,writable:!0}):g[b]=y,g}function r(g,b){if(!(g instanceof b))throw new TypeError("Cannot call a class as a function")}function n(g,b){for(var y=0;y<b.length;y++){var v=b[y];v.enumerable=v.enumerable||!1,v.configurable=!0,"value"in v&&(v.writable=!0),Object.defineProperty(g,o(v.key),v)}}function i(g,b,y){return b&&n(g.prototype,b),Object.defineProperty(g,"prototype",{writable:!1}),g}function o(g){var b=s(g,"string");return typeof b=="symbol"?b:String(b)}function s(g,b){if(typeof g!="object"||g===null)return g;var y=g[Symbol.toPrimitive];if(y!==void 0){var v=y.call(g,b);if(typeof v!="object")return v;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(g)}var l=d1(),c=l.Buffer,u=_te,d=u.inspect,p=d&&d.custom||"inspect";function m(g,b,y){c.prototype.copy.call(g,b,y)}return m7=(function(){function g(){r(this,g),this.head=null,this.tail=null,this.length=0}return i(g,[{key:"push",value:function(b){var y={data:b,next:null};this.length>0?this.tail.next=y:this.head=y,this.tail=y,++this.length}},{key:"unshift",value:function(b){var y={data:b,next:this.head};this.length===0&&(this.tail=y),this.head=y,++this.length}},{key:"shift",value:function(){if(this.length!==0){var b=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,b}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(b){if(this.length===0)return"";for(var y=this.head,v=""+y.data;y=y.next;)v+=b+y.data;return v}},{key:"concat",value:function(b){if(this.length===0)return c.alloc(0);for(var y=c.allocUnsafe(b>>>0),v=this.head,k=0;v;)m(v.data,y,k),k+=v.data.length,v=v.next;return y}},{key:"consume",value:function(b,y){var v;return b<this.head.data.length?(v=this.head.data.slice(0,b),this.head.data=this.head.data.slice(b)):b===this.head.data.length?v=this.shift():v=y?this._getString(b):this._getBuffer(b),v}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(b){var y=this.head,v=1,k=y.data;for(b-=k.length;y=y.next;){var z=y.data,C=b>z.length?z.length:b;if(C===z.length?k+=z:k+=z.slice(0,b),b-=C,b===0){C===z.length?(++v,y.next?this.head=y.next:this.head=this.tail=null):(this.head=y,y.data=z.slice(C));break}++v}return this.length-=v,k}},{key:"_getBuffer",value:function(b){var y=c.allocUnsafe(b),v=this.head,k=1;for(v.data.copy(y),b-=v.data.length;v=v.next;){var z=v.data,C=b>z.length?z.length:b;if(z.copy(y,y.length-b,0,C),b-=C,b===0){C===z.length?(++k,v.next?this.head=v.next:this.head=this.tail=null):(this.head=v,v.data=z.slice(C));break}++k}return this.length-=k,y}},{key:p,value:function(b,y){return d(this,a(a({},y),{},{depth:0,customInspect:!1}))}}]),g})(),m7}var f7,Rte;function Nte(){if(Rte)return f7;Rte=1;function e(o,s){var l=this,c=this._readableState&&this._readableState.destroyed,u=this._writableState&&this._writableState.destroyed;return c||u?(s?s(o):o&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process.nextTick(n,this,o)):process.nextTick(n,this,o)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(o||null,function(d){!s&&d?l._writableState?l._writableState.errorEmitted?process.nextTick(t,l):(l._writableState.errorEmitted=!0,process.nextTick(a,l,d)):process.nextTick(a,l,d):s?(process.nextTick(t,l),s(d)):process.nextTick(t,l)}),this)}function a(o,s){n(o,s),t(o)}function t(o){o._writableState&&!o._writableState.emitClose||o._readableState&&!o._readableState.emitClose||o.emit("close")}function r(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function n(o,s){o.emit("error",s)}function i(o,s){var l=o._readableState,c=o._writableState;l&&l.autoDestroy||c&&c.autoDestroy?o.destroy(s):o.emit("error",s)}return f7={destroy:e,undestroy:r,errorOrDestroy:i},f7}var g7={},Dte;function ev(){if(Dte)return g7;Dte=1;function e(s,l){s.prototype=Object.create(l.prototype),s.prototype.constructor=s,s.__proto__=l}var a={};function t(s,l,c){c||(c=Error);function u(p,m,g){return typeof l=="string"?l:l(p,m,g)}var d=(function(p){e(m,p);function m(g,b,y){return p.call(this,u(g,b,y))||this}return m})(c);d.prototype.name=c.name,d.prototype.code=s,a[s]=d}function r(s,l){if(Array.isArray(s)){var c=s.length;return s=s.map(function(u){return String(u)}),c>2?"one of ".concat(l," ").concat(s.slice(0,c-1).join(", "),", or ")+s[c-1]:c===2?"one of ".concat(l," ").concat(s[0]," or ").concat(s[1]):"of ".concat(l," ").concat(s[0])}else return"of ".concat(l," ").concat(String(s))}function n(s,l,c){return s.substr(0,l.length)===l}function i(s,l,c){return(c===void 0||c>s.length)&&(c=s.length),s.substring(c-l.length,c)===l}function o(s,l,c){return typeof c!="number"&&(c=0),c+l.length>s.length?!1:s.indexOf(l,c)!==-1}return t("ERR_INVALID_OPT_VALUE",function(s,l){return'The value "'+l+'" is invalid for option "'+s+'"'},TypeError),t("ERR_INVALID_ARG_TYPE",function(s,l,c){var u;typeof l=="string"&&n(l,"not ")?(u="must not be",l=l.replace(/^not /,"")):u="must be";var d;if(i(s," argument"))d="The ".concat(s," ").concat(u," ").concat(r(l,"type"));else{var p=o(s,".")?"property":"argument";d='The "'.concat(s,'" ').concat(p," ").concat(u," ").concat(r(l,"type"))}return d+=". Received type ".concat(typeof c),d},TypeError),t("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),t("ERR_METHOD_NOT_IMPLEMENTED",function(s){return"The "+s+" method is not implemented"}),t("ERR_STREAM_PREMATURE_CLOSE","Premature close"),t("ERR_STREAM_DESTROYED",function(s){return"Cannot call "+s+" after a stream was destroyed"}),t("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),t("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),t("ERR_STREAM_WRITE_AFTER_END","write after end"),t("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),t("ERR_UNKNOWN_ENCODING",function(s){return"Unknown encoding: "+s},TypeError),t("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),g7.codes=a,g7}var v7,$te;function Ite(){if($te)return v7;$te=1;var e=ev().codes.ERR_INVALID_OPT_VALUE;function a(r,n,i){return r.highWaterMark!=null?r.highWaterMark:n?r[i]:null}function t(r,n,i,o){var s=a(n,o,i);if(s!=null){if(!(isFinite(s)&&Math.floor(s)===s)||s<0){var l=o?i:"highWaterMark";throw new e(l,s)}return Math.floor(s)}return r.objectMode?16:16*1024}return v7={getHighWaterMark:t},v7}var b7,Kte;function Qaa(){if(Kte)return b7;Kte=1,b7=e;function e(t,r){if(a("noDeprecation"))return t;var n=!1;function i(){if(!n){if(a("throwDeprecation"))throw new Error(r);a("traceDeprecation")?console.trace(r):console.warn(r),n=!0}return t.apply(this,arguments)}return i}function a(t){try{if(!globalThis.localStorage)return!1}catch{return!1}var r=globalThis.localStorage[t];return r==null?!1:String(r).toLowerCase()==="true"}return b7}var y7,Vte;function Hte(){if(Vte)return y7;Vte=1,y7=A;function e(F){var ee=this;this.next=null,this.entry=null,this.finish=function(){_(ee,F)}}var a;A.WritableState=S;var t={deprecate:Qaa()},r=Pte(),n=d1().Buffer,i=(typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function o(F){return n.from(F)}function s(F){return n.isBuffer(F)||F instanceof i}var l=Nte(),c=Ite(),u=c.getHighWaterMark,d=ev().codes,p=d.ERR_INVALID_ARG_TYPE,m=d.ERR_METHOD_NOT_IMPLEMENTED,g=d.ERR_MULTIPLE_CALLBACK,b=d.ERR_STREAM_CANNOT_PIPE,y=d.ERR_STREAM_DESTROYED,v=d.ERR_STREAM_NULL_VALUES,k=d.ERR_STREAM_WRITE_AFTER_END,z=d.ERR_UNKNOWN_ENCODING,C=l.errorOrDestroy;function w(){}function S(F,ee,ie){a=a||av(),F=F||{},typeof ie!="boolean"&&(ie=ee instanceof a),this.objectMode=!!F.objectMode,ie&&(this.objectMode=this.objectMode||!!F.writableObjectMode),this.highWaterMark=u(this,F,"writableHighWaterMark",ie),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var be=F.decodeStrings===!1;this.decodeStrings=!be,this.defaultEncoding=F.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(X){te(ee,X)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=F.emitClose!==!1,this.autoDestroy=!!F.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new e(this)}S.prototype.getBuffer=function(){for(var F=this.bufferedRequest,ee=[];F;)ee.push(F),F=F.next;return ee},(function(){try{Object.defineProperty(S.prototype,"buffer",{get:t.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}})();var O;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(O=Function.prototype[Symbol.hasInstance],Object.defineProperty(A,Symbol.hasInstance,{value:function(F){return O.call(this,F)?!0:this!==A?!1:F&&F._writableState instanceof S}})):O=function(F){return F instanceof this};function A(F){a=a||av();var ee=this instanceof a;if(!ee&&!O.call(A,this))return new A(F);this._writableState=new S(F,this,ee),this.writable=!0,F&&(typeof F.write=="function"&&(this._write=F.write),typeof F.writev=="function"&&(this._writev=F.writev),typeof F.destroy=="function"&&(this._destroy=F.destroy),typeof F.final=="function"&&(this._final=F.final)),r.call(this)}A.prototype.pipe=function(){C(this,new b)};function B(F,ee){var ie=new k;C(F,ie),process.nextTick(ee,ie)}function L(F,ee,ie,be){var X;return ie===null?X=new v:typeof ie!="string"&&!ee.objectMode&&(X=new p("chunk",["string","Buffer"],ie)),X?(C(F,X),process.nextTick(be,X),!1):!0}A.prototype.write=function(F,ee,ie){var be=this._writableState,X=!1,M=!be.objectMode&&s(F);return M&&!n.isBuffer(F)&&(F=o(F)),typeof ee=="function"&&(ie=ee,ee=null),M?ee="buffer":ee||(ee=be.defaultEncoding),typeof ie!="function"&&(ie=w),be.ending?B(this,ie):(M||L(this,be,F,ie))&&(be.pendingcb++,X=N(this,be,M,F,ee,ie)),X},A.prototype.cork=function(){this._writableState.corked++},A.prototype.uncork=function(){var F=this._writableState;F.corked&&(F.corked--,!F.writing&&!F.corked&&!F.bufferProcessing&&F.bufferedRequest&&me(this,F))},A.prototype.setDefaultEncoding=function(F){if(typeof F=="string"&&(F=F.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((F+"").toLowerCase())>-1))throw new z(F);return this._writableState.defaultEncoding=F,this},Object.defineProperty(A.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function q(F,ee,ie){return!F.objectMode&&F.decodeStrings!==!1&&typeof ee=="string"&&(ee=n.from(ee,ie)),ee}Object.defineProperty(A.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function N(F,ee,ie,be,X,M){if(!ie){var $=q(ee,be,X);be!==$&&(ie=!0,X="buffer",be=$)}var oe=ee.objectMode?1:be.length;ee.length+=oe;var G=ee.length<ee.highWaterMark;if(G||(ee.needDrain=!0),ee.writing||ee.corked){var ce=ee.lastBufferedRequest;ee.lastBufferedRequest={chunk:be,encoding:X,isBuf:ie,callback:M,next:null},ce?ce.next=ee.lastBufferedRequest:ee.bufferedRequest=ee.lastBufferedRequest,ee.bufferedRequestCount+=1}else U(F,ee,!1,oe,be,X,M);return G}function U(F,ee,ie,be,X,M,$){ee.writelen=be,ee.writecb=$,ee.writing=!0,ee.sync=!0,ee.destroyed?ee.onwrite(new y("write")):ie?F._writev(X,ee.onwrite):F._write(X,M,ee.onwrite),ee.sync=!1}function D(F,ee,ie,be,X){--ee.pendingcb,ie?(process.nextTick(X,be),process.nextTick(V,F,ee),F._writableState.errorEmitted=!0,C(F,be)):(X(be),F._writableState.errorEmitted=!0,C(F,be),V(F,ee))}function Y(F){F.writing=!1,F.writecb=null,F.length-=F.writelen,F.writelen=0}function te(F,ee){var ie=F._writableState,be=ie.sync,X=ie.writecb;if(typeof X!="function")throw new g;if(Y(ie),ee)D(F,ie,be,ee,X);else{var M=I(ie)||F.destroyed;!M&&!ie.corked&&!ie.bufferProcessing&&ie.bufferedRequest&&me(F,ie),be?process.nextTick(ue,F,ie,M,X):ue(F,ie,M,X)}}function ue(F,ee,ie,be){ie||ne(F,ee),ee.pendingcb--,be(),V(F,ee)}function ne(F,ee){ee.length===0&&ee.needDrain&&(ee.needDrain=!1,F.emit("drain"))}function me(F,ee){ee.bufferProcessing=!0;var ie=ee.bufferedRequest;if(F._writev&&ie&&ie.next){var be=ee.bufferedRequestCount,X=new Array(be),M=ee.corkedRequestsFree;M.entry=ie;for(var $=0,oe=!0;ie;)X[$]=ie,ie.isBuf||(oe=!1),ie=ie.next,$+=1;X.allBuffers=oe,U(F,ee,!0,ee.length,X,"",M.finish),ee.pendingcb++,ee.lastBufferedRequest=null,M.next?(ee.corkedRequestsFree=M.next,M.next=null):ee.corkedRequestsFree=new e(ee),ee.bufferedRequestCount=0}else{for(;ie;){var G=ie.chunk,ce=ie.encoding,pe=ie.callback,Q=ee.objectMode?1:G.length;if(U(F,ee,!1,Q,G,ce,pe),ie=ie.next,ee.bufferedRequestCount--,ee.writing)break}ie===null&&(ee.lastBufferedRequest=null)}ee.bufferedRequest=ie,ee.bufferProcessing=!1}A.prototype._write=function(F,ee,ie){ie(new m("_write()"))},A.prototype._writev=null,A.prototype.end=function(F,ee,ie){var be=this._writableState;return typeof F=="function"?(ie=F,F=null,ee=null):typeof ee=="function"&&(ie=ee,ee=null),F!=null&&this.write(F,ee),be.corked&&(be.corked=1,this.uncork()),be.ending||P(this,be,ie),this},Object.defineProperty(A.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function I(F){return F.ending&&F.length===0&&F.bufferedRequest===null&&!F.finished&&!F.writing}function K(F,ee){F._final(function(ie){ee.pendingcb--,ie&&C(F,ie),ee.prefinished=!0,F.emit("prefinish"),V(F,ee)})}function W(F,ee){!ee.prefinished&&!ee.finalCalled&&(typeof F._final=="function"&&!ee.destroyed?(ee.pendingcb++,ee.finalCalled=!0,process.nextTick(K,F,ee)):(ee.prefinished=!0,F.emit("prefinish")))}function V(F,ee){var ie=I(ee);if(ie&&(W(F,ee),ee.pendingcb===0&&(ee.finished=!0,F.emit("finish"),ee.autoDestroy))){var be=F._readableState;(!be||be.autoDestroy&&be.endEmitted)&&F.destroy()}return ie}function P(F,ee,ie){ee.ending=!0,V(F,ee),ie&&(ee.finished?process.nextTick(ie):F.once("finish",ie)),ee.ended=!0,F.writable=!1}function _(F,ee,ie){var be=F.entry;for(F.entry=null;be;){var X=be.callback;ee.pendingcb--,X(ie),be=be.next}ee.corkedRequestsFree.next=F}return Object.defineProperty(A.prototype,"destroyed",{enumerable:!1,get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(F){this._writableState&&(this._writableState.destroyed=F)}}),A.prototype.destroy=l.destroy,A.prototype._undestroy=l.undestroy,A.prototype._destroy=function(F,ee){ee(F)},y7}var k7,Fte;function av(){if(Fte)return k7;Fte=1;var e=Object.keys||function(c){var u=[];for(var d in c)u.push(d);return u};k7=o;for(var a=Yte(),t=Hte(),r=e(t.prototype),n=0;n<r.length;n++){var i=r[n];o.prototype[i]||(o.prototype[i]=t.prototype[i])}function o(c){if(!(this instanceof o))return new o(c);a.call(this,c),t.call(this,c),this.allowHalfOpen=!0,c&&(c.readable===!1&&(this.readable=!1),c.writable===!1&&(this.writable=!1),c.allowHalfOpen===!1&&(this.allowHalfOpen=!1,this.once("end",s)))}Object.defineProperty(o.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(o.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(o.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function s(){this._writableState.ended||process.nextTick(l,this)}function l(c){c.end()}return Object.defineProperty(o.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(c){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=c,this._writableState.destroyed=c)}}),k7}var x7={},w7={exports:{}};/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */var Gte;function Xaa(){return Gte||(Gte=1,(function(e,a){var t=d1(),r=t.Buffer;function n(o,s){for(var l in o)s[l]=o[l]}r.from&&r.alloc&&r.allocUnsafe&&r.allocUnsafeSlow?e.exports=t:(n(t,a),a.Buffer=i);function i(o,s,l){return r(o,s,l)}i.prototype=Object.create(r.prototype),n(r,i),i.from=function(o,s,l){if(typeof o=="number")throw new TypeError("Argument must not be a number");return r(o,s,l)},i.alloc=function(o,s,l){if(typeof o!="number")throw new TypeError("Argument must be a number");var c=r(o);return s!==void 0?typeof l=="string"?c.fill(s,l):c.fill(s):c.fill(0),c},i.allocUnsafe=function(o){if(typeof o!="number")throw new TypeError("Argument must be a number");return r(o)},i.allocUnsafeSlow=function(o){if(typeof o!="number")throw new TypeError("Argument must be a number");return t.SlowBuffer(o)}})(w7,w7.exports)),w7.exports}var qte;function Jte(){if(qte)return x7;qte=1;var e=Xaa().Buffer,a=e.isEncoding||function(v){switch(v=""+v,v&&v.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function t(v){if(!v)return"utf8";for(var k;;)switch(v){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return v;default:if(k)return;v=(""+v).toLowerCase(),k=!0}}function r(v){var k=t(v);if(typeof k!="string"&&(e.isEncoding===a||!a(v)))throw new Error("Unknown encoding: "+v);return k||v}x7.StringDecoder=n;function n(v){this.encoding=r(v);var k;switch(this.encoding){case"utf16le":this.text=d,this.end=p,k=4;break;case"utf8":this.fillLast=l,k=4;break;case"base64":this.text=m,this.end=g,k=3;break;default:this.write=b,this.end=y;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=e.allocUnsafe(k)}n.prototype.write=function(v){if(v.length===0)return"";var k,z;if(this.lastNeed){if(k=this.fillLast(v),k===void 0)return"";z=this.lastNeed,this.lastNeed=0}else z=0;return z<v.length?k?k+this.text(v,z):this.text(v,z):k||""},n.prototype.end=u,n.prototype.text=c,n.prototype.fillLast=function(v){if(this.lastNeed<=v.length)return v.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);v.copy(this.lastChar,this.lastTotal-this.lastNeed,0,v.length),this.lastNeed-=v.length};function i(v){return v<=127?0:v>>5===6?2:v>>4===14?3:v>>3===30?4:v>>6===2?-1:-2}function o(v,k,z){var C=k.length-1;if(C<z)return 0;var w=i(k[C]);return w>=0?(w>0&&(v.lastNeed=w-1),w):--C<z||w===-2?0:(w=i(k[C]),w>=0?(w>0&&(v.lastNeed=w-2),w):--C<z||w===-2?0:(w=i(k[C]),w>=0?(w>0&&(w===2?w=0:v.lastNeed=w-3),w):0))}function s(v,k,z){if((k[0]&192)!==128)return v.lastNeed=0,"\uFFFD";if(v.lastNeed>1&&k.length>1){if((k[1]&192)!==128)return v.lastNeed=1,"\uFFFD";if(v.lastNeed>2&&k.length>2&&(k[2]&192)!==128)return v.lastNeed=2,"\uFFFD"}}function l(v){var k=this.lastTotal-this.lastNeed,z=s(this,v);if(z!==void 0)return z;if(this.lastNeed<=v.length)return v.copy(this.lastChar,k,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);v.copy(this.lastChar,k,0,v.length),this.lastNeed-=v.length}function c(v,k){var z=o(this,v,k);if(!this.lastNeed)return v.toString("utf8",k);this.lastTotal=z;var C=v.length-(z-this.lastNeed);return v.copy(this.lastChar,0,C),v.toString("utf8",k,C)}function u(v){var k=v&&v.length?this.write(v):"";return this.lastNeed?k+"\uFFFD":k}function d(v,k){if((v.length-k)%2===0){var z=v.toString("utf16le",k);if(z){var C=z.charCodeAt(z.length-1);if(C>=55296&&C<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=v[v.length-2],this.lastChar[1]=v[v.length-1],z.slice(0,-1)}return z}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=v[v.length-1],v.toString("utf16le",k,v.length-1)}function p(v){var k=v&&v.length?this.write(v):"";if(this.lastNeed){var z=this.lastTotal-this.lastNeed;return k+this.lastChar.toString("utf16le",0,z)}return k}function m(v,k){var z=(v.length-k)%3;return z===0?v.toString("base64",k):(this.lastNeed=3-z,this.lastTotal=3,z===1?this.lastChar[0]=v[v.length-1]:(this.lastChar[0]=v[v.length-2],this.lastChar[1]=v[v.length-1]),v.toString("base64",k,v.length-z))}function g(v){var k=v&&v.length?this.write(v):"";return this.lastNeed?k+this.lastChar.toString("base64",0,3-this.lastNeed):k}function b(v){return v.toString(this.encoding)}function y(v){return v&&v.length?this.write(v):""}return x7}var z7,Ute;function S7(){if(Ute)return z7;Ute=1;var e=ev().codes.ERR_STREAM_PREMATURE_CLOSE;function a(i){var o=!1;return function(){if(!o){o=!0;for(var s=arguments.length,l=new Array(s),c=0;c<s;c++)l[c]=arguments[c];i.apply(this,l)}}}function t(){}function r(i){return i.setHeader&&typeof i.abort=="function"}function n(i,o,s){if(typeof o=="function")return n(i,null,o);o||(o={}),s=a(s||t);var l=o.readable||o.readable!==!1&&i.readable,c=o.writable||o.writable!==!1&&i.writable,u=function(){i.writable||p()},d=i._writableState&&i._writableState.finished,p=function(){c=!1,d=!0,l||s.call(i)},m=i._readableState&&i._readableState.endEmitted,g=function(){l=!1,m=!0,c||s.call(i)},b=function(k){s.call(i,k)},y=function(){var k;if(l&&!m)return(!i._readableState||!i._readableState.ended)&&(k=new e),s.call(i,k);if(c&&!d)return(!i._writableState||!i._writableState.ended)&&(k=new e),s.call(i,k)},v=function(){i.req.on("finish",p)};return r(i)?(i.on("complete",p),i.on("abort",y),i.req?v():i.on("request",v)):c&&!i._writableState&&(i.on("end",u),i.on("close",u)),i.on("end",g),i.on("finish",p),o.error!==!1&&i.on("error",b),i.on("close",y),function(){i.removeListener("complete",p),i.removeListener("abort",y),i.removeListener("request",v),i.req&&i.req.removeListener("finish",p),i.removeListener("end",u),i.removeListener("close",u),i.removeListener("finish",p),i.removeListener("end",g),i.removeListener("error",b),i.removeListener("close",y)}}return z7=n,z7}var C7,Wte;function Yaa(){if(Wte)return C7;Wte=1;var e;function a(z,C,w){return C=t(C),C in z?Object.defineProperty(z,C,{value:w,enumerable:!0,configurable:!0,writable:!0}):z[C]=w,z}function t(z){var C=r(z,"string");return typeof C=="symbol"?C:String(C)}function r(z,C){if(typeof z!="object"||z===null)return z;var w=z[Symbol.toPrimitive];if(w!==void 0){var S=w.call(z,C);if(typeof S!="object")return S;throw new TypeError("@@toPrimitive must return a primitive value.")}return(C==="string"?String:Number)(z)}var n=S7(),i=Symbol("lastResolve"),o=Symbol("lastReject"),s=Symbol("error"),l=Symbol("ended"),c=Symbol("lastPromise"),u=Symbol("handlePromise"),d=Symbol("stream");function p(z,C){return{value:z,done:C}}function m(z){var C=z[i];if(C!==null){var w=z[d].read();w!==null&&(z[c]=null,z[i]=null,z[o]=null,C(p(w,!1)))}}function g(z){process.nextTick(m,z)}function b(z,C){return function(w,S){z.then(function(){if(C[l]){w(p(void 0,!0));return}C[u](w,S)},S)}}var y=Object.getPrototypeOf(function(){}),v=Object.setPrototypeOf((e={get stream(){return this[d]},next:function(){var z=this,C=this[s];if(C!==null)return Promise.reject(C);if(this[l])return Promise.resolve(p(void 0,!0));if(this[d].destroyed)return new Promise(function(A,B){process.nextTick(function(){z[s]?B(z[s]):A(p(void 0,!0))})});var w=this[c],S;if(w)S=new Promise(b(w,this));else{var O=this[d].read();if(O!==null)return Promise.resolve(p(O,!1));S=new Promise(this[u])}return this[c]=S,S}},a(e,Symbol.asyncIterator,function(){return this}),a(e,"return",function(){var z=this;return new Promise(function(C,w){z[d].destroy(null,function(S){if(S){w(S);return}C(p(void 0,!0))})})}),e),y),k=function(z){var C,w=Object.create(v,(C={},a(C,d,{value:z,writable:!0}),a(C,i,{value:null,writable:!0}),a(C,o,{value:null,writable:!0}),a(C,s,{value:null,writable:!0}),a(C,l,{value:z._readableState.endEmitted,writable:!0}),a(C,u,{value:function(S,O){var A=w[d].read();A?(w[c]=null,w[i]=null,w[o]=null,S(p(A,!1))):(w[i]=S,w[o]=O)},writable:!0}),C));return w[c]=null,n(z,function(S){if(S&&S.code!=="ERR_STREAM_PREMATURE_CLOSE"){var O=w[o];O!==null&&(w[c]=null,w[i]=null,w[o]=null,O(S)),w[s]=S;return}var A=w[i];A!==null&&(w[c]=null,w[i]=null,w[o]=null,A(p(void 0,!0))),w[l]=!0}),z.on("readable",g.bind(null,w)),w};return C7=k,C7}var Zte,Qte;function eta(){return Qte||(Qte=1,Zte=function(){throw new Error("Readable.from is not available in the browser")}),Zte}var j7,Xte;function Yte(){if(Xte)return j7;Xte=1,j7=B;var e;B.ReadableState=A;var a=function(M,$){return M.listeners($).length},t=Pte(),r=d1().Buffer,n=(typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function i(M){return r.from(M)}function o(M){return r.isBuffer(M)||M instanceof n}var s=_te,l;s&&s.debuglog?l=s.debuglog("stream"):l=function(){};var c=Zaa(),u=Nte(),d=Ite(),p=d.getHighWaterMark,m=ev().codes,g=m.ERR_INVALID_ARG_TYPE,b=m.ERR_STREAM_PUSH_AFTER_EOF,y=m.ERR_METHOD_NOT_IMPLEMENTED,v=m.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,k,z,C,w=u.errorOrDestroy,S=["error","close","destroy","pause","resume"];function O(M,$,oe){if(typeof M.prependListener=="function")return M.prependListener($,oe);!M._events||!M._events[$]?M.on($,oe):Array.isArray(M._events[$])?M._events[$].unshift(oe):M._events[$]=[oe,M._events[$]]}function A(M,$,oe){e=e||av(),M=M||{},typeof oe!="boolean"&&(oe=$ instanceof e),this.objectMode=!!M.objectMode,oe&&(this.objectMode=this.objectMode||!!M.readableObjectMode),this.highWaterMark=p(this,M,"readableHighWaterMark",oe),this.buffer=new c,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=M.emitClose!==!1,this.autoDestroy=!!M.autoDestroy,this.destroyed=!1,this.defaultEncoding=M.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,M.encoding&&(k||(k=Jte().StringDecoder),this.decoder=new k(M.encoding),this.encoding=M.encoding)}function B(M){if(e=e||av(),!(this instanceof B))return new B(M);var $=this instanceof e;this._readableState=new A(M,this,$),this.readable=!0,M&&(typeof M.read=="function"&&(this._read=M.read),typeof M.destroy=="function"&&(this._destroy=M.destroy)),t.call(this)}Object.defineProperty(B.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(M){this._readableState&&(this._readableState.destroyed=M)}}),B.prototype.destroy=u.destroy,B.prototype._undestroy=u.undestroy,B.prototype._destroy=function(M,$){$(M)},B.prototype.push=function(M,$){var oe=this._readableState,G;return oe.objectMode?G=!0:typeof M=="string"&&($=$||oe.defaultEncoding,$!==oe.encoding&&(M=r.from(M,$),$=""),G=!0),L(this,M,$,!1,G)},B.prototype.unshift=function(M){return L(this,M,null,!0,!1)};function L(M,$,oe,G,ce){l("readableAddChunk",$);var pe=M._readableState;if($===null)pe.reading=!1,te(M,pe);else{var Q;if(ce||(Q=N(pe,$)),Q)w(M,Q);else if(pe.objectMode||$&&$.length>0)if(typeof $!="string"&&!pe.objectMode&&Object.getPrototypeOf($)!==r.prototype&&($=i($)),G)pe.endEmitted?w(M,new v):q(M,pe,$,!0);else if(pe.ended)w(M,new b);else{if(pe.destroyed)return!1;pe.reading=!1,pe.decoder&&!oe?($=pe.decoder.write($),pe.objectMode||$.length!==0?q(M,pe,$,!1):me(M,pe)):q(M,pe,$,!1)}else G||(pe.reading=!1,me(M,pe))}return!pe.ended&&(pe.length<pe.highWaterMark||pe.length===0)}function q(M,$,oe,G){$.flowing&&$.length===0&&!$.sync?($.awaitDrain=0,M.emit("data",oe)):($.length+=$.objectMode?1:oe.length,G?$.buffer.unshift(oe):$.buffer.push(oe),$.needReadable&&ue(M)),me(M,$)}function N(M,$){var oe;return!o($)&&typeof $!="string"&&$!==void 0&&!M.objectMode&&(oe=new g("chunk",["string","Buffer","Uint8Array"],$)),oe}B.prototype.isPaused=function(){return this._readableState.flowing===!1},B.prototype.setEncoding=function(M){k||(k=Jte().StringDecoder);var $=new k(M);this._readableState.decoder=$,this._readableState.encoding=this._readableState.decoder.encoding;for(var oe=this._readableState.buffer.head,G="";oe!==null;)G+=$.write(oe.data),oe=oe.next;return this._readableState.buffer.clear(),G!==""&&this._readableState.buffer.push(G),this._readableState.length=G.length,this};var U=1073741824;function D(M){return M>=U?M=U:(M--,M|=M>>>1,M|=M>>>2,M|=M>>>4,M|=M>>>8,M|=M>>>16,M++),M}function Y(M,$){return M<=0||$.length===0&&$.ended?0:$.objectMode?1:M!==M?$.flowing&&$.length?$.buffer.head.data.length:$.length:(M>$.highWaterMark&&($.highWaterMark=D(M)),M<=$.length?M:$.ended?$.length:($.needReadable=!0,0))}B.prototype.read=function(M){l("read",M),M=parseInt(M,10);var $=this._readableState,oe=M;if(M!==0&&($.emittedReadable=!1),M===0&&$.needReadable&&(($.highWaterMark!==0?$.length>=$.highWaterMark:$.length>0)||$.ended))return l("read: emitReadable",$.length,$.ended),$.length===0&&$.ended?ie(this):ue(this),null;if(M=Y(M,$),M===0&&$.ended)return $.length===0&&ie(this),null;var G=$.needReadable;l("need readable",G),($.length===0||$.length-M<$.highWaterMark)&&(G=!0,l("length less than watermark",G)),$.ended||$.reading?(G=!1,l("reading or ended",G)):G&&(l("do read"),$.reading=!0,$.sync=!0,$.length===0&&($.needReadable=!0),this._read($.highWaterMark),$.sync=!1,$.reading||(M=Y(oe,$)));var ce;return M>0?ce=ee(M,$):ce=null,ce===null?($.needReadable=$.length<=$.highWaterMark,M=0):($.length-=M,$.awaitDrain=0),$.length===0&&($.ended||($.needReadable=!0),oe!==M&&$.ended&&ie(this)),ce!==null&&this.emit("data",ce),ce};function te(M,$){if(l("onEofChunk"),!$.ended){if($.decoder){var oe=$.decoder.end();oe&&oe.length&&($.buffer.push(oe),$.length+=$.objectMode?1:oe.length)}$.ended=!0,$.sync?ue(M):($.needReadable=!1,$.emittedReadable||($.emittedReadable=!0,ne(M)))}}function ue(M){var $=M._readableState;l("emitReadable",$.needReadable,$.emittedReadable),$.needReadable=!1,$.emittedReadable||(l("emitReadable",$.flowing),$.emittedReadable=!0,process.nextTick(ne,M))}function ne(M){var $=M._readableState;l("emitReadable_",$.destroyed,$.length,$.ended),!$.destroyed&&($.length||$.ended)&&(M.emit("readable"),$.emittedReadable=!1),$.needReadable=!$.flowing&&!$.ended&&$.length<=$.highWaterMark,F(M)}function me(M,$){$.readingMore||($.readingMore=!0,process.nextTick(I,M,$))}function I(M,$){for(;!$.reading&&!$.ended&&($.length<$.highWaterMark||$.flowing&&$.length===0);){var oe=$.length;if(l("maybeReadMore read 0"),M.read(0),oe===$.length)break}$.readingMore=!1}B.prototype._read=function(M){w(this,new y("_read()"))},B.prototype.pipe=function(M,$){var oe=this,G=this._readableState;switch(G.pipesCount){case 0:G.pipes=M;break;case 1:G.pipes=[G.pipes,M];break;default:G.pipes.push(M);break}G.pipesCount+=1,l("pipe count=%d opts=%j",G.pipesCount,$);var ce=(!$||$.end!==!1)&&M!==null&&M!==process.stderr,pe=ce?re:Ye;G.endEmitted?process.nextTick(pe):oe.once("end",pe),M.on("unpipe",Q);function Q(E,ae){l("onunpipe"),E===oe&&ae&&ae.hasUnpiped===!1&&(ae.hasUnpiped=!0,ge())}function re(){l("onend"),M.end()}var de=K(oe);M.on("drain",de);var fe=!1;function ge(){l("cleanup"),M.removeListener("close",Oe),M.removeListener("finish",_e),M.removeListener("drain",de),M.removeListener("error",xe),M.removeListener("unpipe",Q),oe.removeListener("end",re),oe.removeListener("end",Ye),oe.removeListener("data",he),fe=!0,G.awaitDrain&&(!M._writableState||M._writableState.needDrain)&&de()}oe.on("data",he);function he(E){l("ondata");var ae=M.write(E);l("dest.write",ae),ae===!1&&((G.pipesCount===1&&G.pipes===M||G.pipesCount>1&&X(G.pipes,M)!==-1)&&!fe&&(l("false write response, pause",G.awaitDrain),G.awaitDrain++),oe.pause())}function xe(E){l("onerror",E),Ye(),M.removeListener("error",xe),a(M,"error")===0&&w(M,E)}O(M,"error",xe);function Oe(){M.removeListener("finish",_e),Ye()}M.once("close",Oe);function _e(){l("onfinish"),M.removeListener("close",Oe),Ye()}M.once("finish",_e);function Ye(){l("unpipe"),oe.unpipe(M)}return M.emit("pipe",oe),G.flowing||(l("pipe resume"),oe.resume()),M};function K(M){return function(){var $=M._readableState;l("pipeOnDrain",$.awaitDrain),$.awaitDrain&&$.awaitDrain--,$.awaitDrain===0&&a(M,"data")&&($.flowing=!0,F(M))}}B.prototype.unpipe=function(M){var $=this._readableState,oe={hasUnpiped:!1};if($.pipesCount===0)return this;if($.pipesCount===1)return M&&M!==$.pipes?this:(M||(M=$.pipes),$.pipes=null,$.pipesCount=0,$.flowing=!1,M&&M.emit("unpipe",this,oe),this);if(!M){var G=$.pipes,ce=$.pipesCount;$.pipes=null,$.pipesCount=0,$.flowing=!1;for(var pe=0;pe<ce;pe++)G[pe].emit("unpipe",this,{hasUnpiped:!1});return this}var Q=X($.pipes,M);return Q===-1?this:($.pipes.splice(Q,1),$.pipesCount-=1,$.pipesCount===1&&($.pipes=$.pipes[0]),M.emit("unpipe",this,oe),this)},B.prototype.on=function(M,$){var oe=t.prototype.on.call(this,M,$),G=this._readableState;return M==="data"?(G.readableListening=this.listenerCount("readable")>0,G.flowing!==!1&&this.resume()):M==="readable"&&!G.endEmitted&&!G.readableListening&&(G.readableListening=G.needReadable=!0,G.flowing=!1,G.emittedReadable=!1,l("on readable",G.length,G.reading),G.length?ue(this):G.reading||process.nextTick(V,this)),oe},B.prototype.addListener=B.prototype.on,B.prototype.removeListener=function(M,$){var oe=t.prototype.removeListener.call(this,M,$);return M==="readable"&&process.nextTick(W,this),oe},B.prototype.removeAllListeners=function(M){var $=t.prototype.removeAllListeners.apply(this,arguments);return(M==="readable"||M===void 0)&&process.nextTick(W,this),$};function W(M){var $=M._readableState;$.readableListening=M.listenerCount("readable")>0,$.resumeScheduled&&!$.paused?$.flowing=!0:M.listenerCount("data")>0&&M.resume()}function V(M){l("readable nexttick read 0"),M.read(0)}B.prototype.resume=function(){var M=this._readableState;return M.flowing||(l("resume"),M.flowing=!M.readableListening,P(this,M)),M.paused=!1,this};function P(M,$){$.resumeScheduled||($.resumeScheduled=!0,process.nextTick(_,M,$))}function _(M,$){l("resume",$.reading),$.reading||M.read(0),$.resumeScheduled=!1,M.emit("resume"),F(M),$.flowing&&!$.reading&&M.read(0)}B.prototype.pause=function(){return l("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(l("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function F(M){var $=M._readableState;for(l("flow",$.flowing);$.flowing&&M.read()!==null;);}B.prototype.wrap=function(M){var $=this,oe=this._readableState,G=!1;M.on("end",function(){if(l("wrapped end"),oe.decoder&&!oe.ended){var Q=oe.decoder.end();Q&&Q.length&&$.push(Q)}$.push(null)}),M.on("data",function(Q){if(l("wrapped data"),oe.decoder&&(Q=oe.decoder.write(Q)),!(oe.objectMode&&Q==null)&&!(!oe.objectMode&&(!Q||!Q.length))){var re=$.push(Q);re||(G=!0,M.pause())}});for(var ce in M)this[ce]===void 0&&typeof M[ce]=="function"&&(this[ce]=(function(Q){return function(){return M[Q].apply(M,arguments)}})(ce));for(var pe=0;pe<S.length;pe++)M.on(S[pe],this.emit.bind(this,S[pe]));return this._read=function(Q){l("wrapped _read",Q),G&&(G=!1,M.resume())},this},typeof Symbol=="function"&&(B.prototype[Symbol.asyncIterator]=function(){return z===void 0&&(z=Yaa()),z(this)}),Object.defineProperty(B.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(B.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(B.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(M){this._readableState&&(this._readableState.flowing=M)}}),B._fromList=ee,Object.defineProperty(B.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}});function ee(M,$){if($.length===0)return null;var oe;return $.objectMode?oe=$.buffer.shift():!M||M>=$.length?($.decoder?oe=$.buffer.join(""):$.buffer.length===1?oe=$.buffer.first():oe=$.buffer.concat($.length),$.buffer.clear()):oe=$.buffer.consume(M,$.decoder),oe}function ie(M){var $=M._readableState;l("endReadable",$.endEmitted),$.endEmitted||($.ended=!0,process.nextTick(be,$,M))}function be(M,$){if(l("endReadableNT",M.endEmitted,M.length),!M.endEmitted&&M.length===0&&(M.endEmitted=!0,$.readable=!1,$.emit("end"),M.autoDestroy)){var oe=$._writableState;(!oe||oe.autoDestroy&&oe.finished)&&$.destroy()}}typeof Symbol=="function"&&(B.from=function(M,$){return C===void 0&&(C=eta()),C(B,M,$)});function X(M,$){for(var oe=0,G=M.length;oe<G;oe++)if(M[oe]===$)return oe;return-1}return j7}var O7,ere;function are(){if(ere)return O7;ere=1,O7=s;var e=ev().codes,a=e.ERR_METHOD_NOT_IMPLEMENTED,t=e.ERR_MULTIPLE_CALLBACK,r=e.ERR_TRANSFORM_ALREADY_TRANSFORMING,n=e.ERR_TRANSFORM_WITH_LENGTH_0,i=av();function o(u,d){var p=this._transformState;p.transforming=!1;var m=p.writecb;if(m===null)return this.emit("error",new t);p.writechunk=null,p.writecb=null,d!=null&&this.push(d),m(u);var g=this._readableState;g.reading=!1,(g.needReadable||g.length<g.highWaterMark)&&this._read(g.highWaterMark)}function s(u){if(!(this instanceof s))return new s(u);i.call(this,u),this._transformState={afterTransform:o.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,u&&(typeof u.transform=="function"&&(this._transform=u.transform),typeof u.flush=="function"&&(this._flush=u.flush)),this.on("prefinish",l)}function l(){var u=this;typeof this._flush=="function"&&!this._readableState.destroyed?this._flush(function(d,p){c(u,d,p)}):c(this,null,null)}s.prototype.push=function(u,d){return this._transformState.needTransform=!1,i.prototype.push.call(this,u,d)},s.prototype._transform=function(u,d,p){p(new a("_transform()"))},s.prototype._write=function(u,d,p){var m=this._transformState;if(m.writecb=p,m.writechunk=u,m.writeencoding=d,!m.transforming){var g=this._readableState;(m.needTransform||g.needReadable||g.length<g.highWaterMark)&&this._read(g.highWaterMark)}},s.prototype._read=function(u){var d=this._transformState;d.writechunk!==null&&!d.transforming?(d.transforming=!0,this._transform(d.writechunk,d.writeencoding,d.afterTransform)):d.needTransform=!0},s.prototype._destroy=function(u,d){i.prototype._destroy.call(this,u,function(p){d(p)})};function c(u,d,p){if(d)return u.emit("error",d);if(p!=null&&u.push(p),u._writableState.length)throw new n;if(u._transformState.transforming)throw new r;return u.push(null)}return O7}var A7,tre;function ata(){if(tre)return A7;tre=1,A7=a;var e=are();function a(t){if(!(this instanceof a))return new a(t);e.call(this,t)}return a.prototype._transform=function(t,r,n){n(null,t)},A7}var P7,rre;function tta(){if(rre)return P7;rre=1;var e;function a(p){var m=!1;return function(){m||(m=!0,p.apply(void 0,arguments))}}var t=ev().codes,r=t.ERR_MISSING_ARGS,n=t.ERR_STREAM_DESTROYED;function i(p){if(p)throw p}function o(p){return p.setHeader&&typeof p.abort=="function"}function s(p,m,g,b){b=a(b);var y=!1;p.on("close",function(){y=!0}),e===void 0&&(e=S7()),e(p,{readable:m,writable:g},function(k){if(k)return b(k);y=!0,b()});var v=!1;return function(k){if(!y&&!v){if(v=!0,o(p))return p.abort();if(typeof p.destroy=="function")return p.destroy();b(k||new n("pipe"))}}}function l(p){p()}function c(p,m){return p.pipe(m)}function u(p){return!p.length||typeof p[p.length-1]!="function"?i:p.pop()}function d(){for(var p=arguments.length,m=new Array(p),g=0;g<p;g++)m[g]=arguments[g];var b=u(m);if(Array.isArray(m[0])&&(m=m[0]),m.length<2)throw new r("streams");var y,v=m.map(function(k,z){var C=z<m.length-1,w=z>0;return s(k,C,w,function(S){y||(y=S),S&&v.forEach(l),!C&&(v.forEach(l),b(y))})});return m.reduce(c)}return P7=d,P7}var nre;function ire(){return nre||(nre=1,(function(e,a){a=e.exports=Yte(),a.Stream=a,a.Readable=a,a.Writable=Hte(),a.Duplex=av(),a.Transform=are(),a.PassThrough=ata(),a.finished=S7(),a.pipeline=tta()})(p7,p7.exports)),p7.exports}var ore;function sre(){if(ore)return S2;ore=1;var e=Cte(),a=t9(),t=ire(),r=S2.readyStates={UNSENT:0,OPENED:1,HEADERS_RECEIVED:2,LOADING:3,DONE:4},n=S2.IncomingMessage=function(i,o,s,l){var c=this;if(t.Readable.call(c),c._mode=s,c.headers={},c.rawHeaders=[],c.trailers={},c.rawTrailers=[],c.on("end",function(){process.nextTick(function(){c.emit("close")})}),s==="fetch"){let b=function(){d.read().then(function(y){if(!c._destroyed){if(l(y.done),y.done){c.push(null);return}c.push(Buffer.from(y.value)),b()}}).catch(function(y){l(!0),c._destroyed||c.emit("error",y)})};if(c._fetchResponse=o,c.url=o.url,c.statusCode=o.status,c.statusMessage=o.statusText,o.headers.forEach(function(y,v){c.headers[v.toLowerCase()]=y,c.rawHeaders.push(v,y)}),e.writableStream){var u=new WritableStream({write:function(y){return l(!1),new Promise(function(v,k){c._destroyed?k():c.push(Buffer.from(y))?v():c._resumeFetch=v})},close:function(){l(!0),c._destroyed||c.push(null)},abort:function(y){l(!0),c._destroyed||c.emit("error",y)}});try{o.body.pipeTo(u).catch(function(y){l(!0),c._destroyed||c.emit("error",y)});return}catch{}}var d=o.body.getReader();b()}else{c._xhr=i,c._pos=0,c.url=i.responseURL,c.statusCode=i.status,c.statusMessage=i.statusText;var p=i.getAllResponseHeaders().split(/\r?\n/);if(p.forEach(function(b){var y=b.match(/^([^:]+):\s*(.*)/);if(y){var v=y[1].toLowerCase();v==="set-cookie"?(c.headers[v]===void 0&&(c.headers[v]=[]),c.headers[v].push(y[2])):c.headers[v]!==void 0?c.headers[v]+=", "+y[2]:c.headers[v]=y[2],c.rawHeaders.push(y[1],y[2])}}),c._charset="x-user-defined",!e.overrideMimeType){var m=c.rawHeaders["mime-type"];if(m){var g=m.match(/;\s*charset=([^;])(;|$)/);g&&(c._charset=g[1].toLowerCase())}c._charset||(c._charset="utf-8")}}};return a(n,t.Readable),n.prototype._read=function(){var i=this,o=i._resumeFetch;o&&(i._resumeFetch=null,o())},n.prototype._onXHRProgress=function(i){var o=this,s=o._xhr,l=null;switch(o._mode){case"text":if(l=s.responseText,l.length>o._pos){var c=l.substr(o._pos);if(o._charset==="x-user-defined"){for(var u=Buffer.alloc(c.length),d=0;d<c.length;d++)u[d]=c.charCodeAt(d)&255;o.push(u)}else o.push(c,o._charset);o._pos=l.length}break;case"arraybuffer":if(s.readyState!==r.DONE||!s.response)break;l=s.response,o.push(Buffer.from(new Uint8Array(l)));break;case"moz-chunked-arraybuffer":if(l=s.response,s.readyState!==r.LOADING||!l)break;o.push(Buffer.from(new Uint8Array(l)));break;case"ms-stream":if(l=s.response,s.readyState!==r.LOADING)break;var p=new globalThis.MSStreamReader;p.onprogress=function(){p.result.byteLength>o._pos&&(o.push(Buffer.from(new Uint8Array(p.result.slice(o._pos)))),o._pos=p.result.byteLength)},p.onload=function(){i(!0),o.push(null)},p.readAsArrayBuffer(l);break}o._xhr.readyState===r.DONE&&o._mode!=="ms-stream"&&(i(!0),o.push(null))},S2}var lre;function rta(){if(lre)return d7.exports;lre=1;var e=Cte(),a=t9(),t=sre(),r=ire(),n=t.IncomingMessage,i=t.readyStates;function o(u,d){return e.fetch&&d?"fetch":e.mozchunkedarraybuffer?"moz-chunked-arraybuffer":e.msstream?"ms-stream":e.arraybuffer&&u?"arraybuffer":"text"}var s=d7.exports=function(u){var d=this;r.Writable.call(d),d._opts=u,d._body=[],d._headers={},u.auth&&d.setHeader("Authorization","Basic "+Buffer.from(u.auth).toString("base64")),Object.keys(u.headers).forEach(function(g){d.setHeader(g,u.headers[g])});var p,m=!0;if(u.mode==="disable-fetch"||"requestTimeout"in u&&!e.abortController)m=!1,p=!0;else if(u.mode==="prefer-streaming")p=!1;else if(u.mode==="allow-wrong-content-type")p=!e.overrideMimeType;else if(!u.mode||u.mode==="default"||u.mode==="prefer-fast")p=!0;else throw new Error("Invalid value for opts.mode");d._mode=o(p,m),d._fetchTimer=null,d._socketTimeout=null,d._socketTimer=null,d.on("finish",function(){d._onFinish()})};a(s,r.Writable),s.prototype.setHeader=function(u,d){var p=this,m=u.toLowerCase();c.indexOf(m)===-1&&(p._headers[m]={name:u,value:d})},s.prototype.getHeader=function(u){var d=this._headers[u.toLowerCase()];return d?d.value:null},s.prototype.removeHeader=function(u){var d=this;delete d._headers[u.toLowerCase()]},s.prototype._onFinish=function(){var u=this;if(!u._destroyed){var d=u._opts;"timeout"in d&&d.timeout!==0&&u.setTimeout(d.timeout);var p=u._headers,m=null;d.method!=="GET"&&d.method!=="HEAD"&&(m=new Blob(u._body,{type:(p["content-type"]||{}).value||""}));var g=[];if(Object.keys(p).forEach(function(k){var z=p[k].name,C=p[k].value;Array.isArray(C)?C.forEach(function(w){g.push([z,w])}):g.push([z,C])}),u._mode==="fetch"){var b=null;if(e.abortController){var y=new AbortController;b=y.signal,u._fetchAbortController=y,"requestTimeout"in d&&d.requestTimeout!==0&&(u._fetchTimer=globalThis.setTimeout(function(){u.emit("requestTimeout"),u._fetchAbortController&&u._fetchAbortController.abort()},d.requestTimeout))}globalThis.fetch(u._opts.url,{method:u._opts.method,headers:g,body:m||void 0,mode:"cors",credentials:d.withCredentials?"include":"same-origin",signal:b}).then(function(k){u._fetchResponse=k,u._resetTimers(!1),u._connect()},function(k){u._resetTimers(!0),u._destroyed||u.emit("error",k)})}else{var v=u._xhr=new globalThis.XMLHttpRequest;try{v.open(u._opts.method,u._opts.url,!0)}catch(k){process.nextTick(function(){u.emit("error",k)});return}"responseType"in v&&(v.responseType=u._mode),"withCredentials"in v&&(v.withCredentials=!!d.withCredentials),u._mode==="text"&&"overrideMimeType"in v&&v.overrideMimeType("text/plain; charset=x-user-defined"),"requestTimeout"in d&&(v.timeout=d.requestTimeout,v.ontimeout=function(){u.emit("requestTimeout")}),g.forEach(function(k){v.setRequestHeader(k[0],k[1])}),u._response=null,v.onreadystatechange=function(){switch(v.readyState){case i.LOADING:case i.DONE:u._onXHRProgress();break}},u._mode==="moz-chunked-arraybuffer"&&(v.onprogress=function(){u._onXHRProgress()}),v.onerror=function(){u._destroyed||(u._resetTimers(!0),u.emit("error",new Error("XHR error")))};try{v.send(m)}catch(k){process.nextTick(function(){u.emit("error",k)});return}}}};function l(u){try{var d=u.status;return d!==null&&d!==0}catch{return!1}}s.prototype._onXHRProgress=function(){var u=this;u._resetTimers(!1),!(!l(u._xhr)||u._destroyed)&&(u._response||u._connect(),u._response._onXHRProgress(u._resetTimers.bind(u)))},s.prototype._connect=function(){var u=this;u._destroyed||(u._response=new n(u._xhr,u._fetchResponse,u._mode,u._resetTimers.bind(u)),u._response.on("error",function(d){u.emit("error",d)}),u.emit("response",u._response))},s.prototype._write=function(u,d,p){var m=this;m._body.push(u),p()},s.prototype._resetTimers=function(u){var d=this;globalThis.clearTimeout(d._socketTimer),d._socketTimer=null,u?(globalThis.clearTimeout(d._fetchTimer),d._fetchTimer=null):d._socketTimeout&&(d._socketTimer=globalThis.setTimeout(function(){d.emit("timeout")},d._socketTimeout))},s.prototype.abort=s.prototype.destroy=function(u){var d=this;d._destroyed=!0,d._resetTimers(!0),d._response&&(d._response._destroyed=!0),d._xhr?d._xhr.abort():d._fetchAbortController&&d._fetchAbortController.abort(),u&&d.emit("error",u)},s.prototype.end=function(u,d,p){var m=this;typeof u=="function"&&(p=u,u=void 0),r.Writable.prototype.end.call(m,u,d,p)},s.prototype.setTimeout=function(u,d){var p=this;d&&p.once("timeout",d),p._socketTimeout=u,p._resetTimers(!1)},s.prototype.flushHeaders=function(){},s.prototype.setNoDelay=function(){},s.prototype.setSocketKeepAlive=function(){};var c=["accept-charset","accept-encoding","access-control-request-headers","access-control-request-method","connection","content-length","cookie","cookie2","date","dnt","expect","host","keep-alive","origin","referer","te","trailer","transfer-encoding","upgrade","via"];return d7.exports}var M7,cre;function nta(){if(cre)return M7;cre=1,M7=a;var e=Object.prototype.hasOwnProperty;function a(){for(var t={},r=0;r<arguments.length;r++){var n=arguments[r];for(var i in n)e.call(n,i)&&(t[i]=n[i])}return t}return M7}var ure,dre;function ita(){return dre||(dre=1,ure={100:"Continue",101:"Switching Protocols",102:"Processing",200:"OK",201:"Created",202:"Accepted",203:"Non-Authoritative Information",204:"No Content",205:"Reset Content",206:"Partial Content",207:"Multi-Status",208:"Already Reported",226:"IM Used",300:"Multiple Choices",301:"Moved Permanently",302:"Found",303:"See Other",304:"Not Modified",305:"Use Proxy",307:"Temporary Redirect",308:"Permanent Redirect",400:"Bad Request",401:"Unauthorized",402:"Payment Required",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",406:"Not Acceptable",407:"Proxy Authentication Required",408:"Request Timeout",409:"Conflict",410:"Gone",411:"Length Required",412:"Precondition Failed",413:"Payload Too Large",414:"URI Too Long",415:"Unsupported Media Type",416:"Range Not Satisfiable",417:"Expectation Failed",418:"I'm a teapot",421:"Misdirected Request",422:"Unprocessable Entity",423:"Locked",424:"Failed Dependency",425:"Unordered Collection",426:"Upgrade Required",428:"Precondition Required",429:"Too Many Requests",431:"Request Header Fields Too Large",451:"Unavailable For Legal Reasons",500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Timeout",505:"HTTP Version Not Supported",506:"Variant Also Negotiates",507:"Insufficient Storage",508:"Loop Detected",509:"Bandwidth Limit Exceeded",510:"Not Extended",511:"Network Authentication Required"}),ure}var pre;function ota(){return pre||(pre=1,(function(e){var a=rta(),t=sre(),r=nta(),n=ita(),i=QB(),o=e;o.request=function(s,l){typeof s=="string"?s=i.parse(s):s=r(s);var c=globalThis.location.protocol.search(/^https?:$/)===-1?"http:":"",u=s.protocol||c,d=s.hostname||s.host,p=s.port,m=s.path||"/";d&&d.indexOf(":")!==-1&&(d="["+d+"]"),s.url=(d?u+"//"+d:"")+(p?":"+p:"")+m,s.method=(s.method||"GET").toUpperCase(),s.headers=s.headers||{};var g=new a(s);return l&&g.on("response",l),g},o.get=function(s,l){var c=o.request(s,l);return c.end(),c},o.ClientRequest=a,o.IncomingMessage=t.IncomingMessage,o.Agent=function(){},o.Agent.defaultMaxSockets=4,o.globalAgent=new o.Agent,o.STATUS_CODES=n,o.METHODS=["CHECKOUT","CONNECT","COPY","DELETE","GET","HEAD","LOCK","M-SEARCH","MERGE","MKACTIVITY","MKCOL","MOVE","NOTIFY","OPTIONS","PATCH","POST","PROPFIND","PROPPATCH","PURGE","PUT","REPORT","SEARCH","SUBSCRIBE","TRACE","UNLOCK","UNSUBSCRIBE"]})(wte)),wte}var hre,mre;function sta(){return mre||(mre=1,hre={statusCodes:Object.assign({},{default:"Default response","1XX":"Informational",103:"Early hints","2XX":"Successful","3XX":"Redirection","4XX":"Client Error","5XX":"Server Error","7XX":"Developer Error"},ota().STATUS_CODES)}),hre}const lta="7.0.8",cta={version:lta};var T7,fre;function uta(){if(fre)return T7;fre=1;const e=Yg,a=QB(),t=Vaa(),r=Yg,n=Yg,i=w2(),o=i.jptr,s=t7().isRef,l=z2().clone,c=z2().circularClone,u=i7().recurse,d=Gaa(),p=qaa(),m=yte(),g=sta().statusCodes,b=cta.version,y="3.0.0";let v;class k extends Error{constructor($){super($),this.name="S2OError"}}function z(M,$){let oe=new k(M);if(oe.options=$,$.promise)$.promise.reject(oe);else throw oe}function C(M,$,oe){oe.warnOnly?$[oe.warnProperty||"x-s2o-warning"]=M:z(M,oe)}function w(M,$,oe){if(M.nullable&&oe.patches++,M.discriminator&&typeof M.discriminator=="string"&&(M.discriminator={propertyName:M.discriminator}),M.items&&Array.isArray(M.items)&&(M.items.length===0?M.items={}:M.items.length===1?M.items=M.items[0]:M.items={anyOf:M.items}),M.type&&Array.isArray(M.type))if(oe.patch){if(oe.patches++,M.type.length===0)delete M.type;else{M.oneOf||(M.oneOf=[]);for(let G of M.type){let ce={};if(G==="null")M.nullable=!0;else{ce.type=G;for(let pe of m.arrayProperties)typeof M.prop<"u"&&(ce[pe]=M[pe],delete M[pe])}ce.type&&M.oneOf.push(ce)}delete M.type,M.oneOf.length===0?delete M.oneOf:M.oneOf.length<2&&(M.type=M.oneOf[0].type,Object.keys(M.oneOf[0]).length>1&&C("Lost properties from oneOf",M,oe),delete M.oneOf)}M.type&&Array.isArray(M.type)&&M.type.length===1&&(M.type=M.type[0])}else z("(Patchable) schema type must not be an array",oe);M.type&&M.type==="null"&&(delete M.type,M.nullable=!0),M.type==="array"&&!M.items&&(M.items={}),M.type==="file"&&(M.type="string",M.format="binary"),typeof M.required=="boolean"&&(M.required&&M.name&&(typeof $.required>"u"&&($.required=[]),Array.isArray($.required)&&$.required.push(M.name)),delete M.required),M.xml&&typeof M.xml.namespace=="string"&&(M.xml.namespace||delete M.xml.namespace),typeof M.allowEmptyValue<"u"&&(oe.patches++,delete M.allowEmptyValue)}function S(M,$){if(M["x-required"]&&Array.isArray(M["x-required"])&&(M.required||(M.required=[]),M.required=M.required.concat(M["x-required"]),delete M["x-required"]),M["x-anyOf"]&&(M.anyOf=M["x-anyOf"],delete M["x-anyOf"]),M["x-oneOf"]&&(M.oneOf=M["x-oneOf"],delete M["x-oneOf"]),M["x-not"]&&(M.not=M["x-not"],delete M["x-not"]),typeof M["x-nullable"]=="boolean"&&(M.nullable=M["x-nullable"],delete M["x-nullable"]),typeof M["x-discriminator"]=="object"&&typeof M["x-discriminator"].propertyName=="string"){M.discriminator=M["x-discriminator"],delete M["x-discriminator"];for(let oe in M.discriminator.mapping){let G=M.discriminator.mapping[oe];G.startsWith("#/definitions/")&&(M.discriminator.mapping[oe]=G.replace("#/definitions/","#/components/schemas/"))}}}function O(M,$){p.walkSchema(M,{},{},function(oe,G,ce){S(oe),w(oe,G,$)})}function A(M){return M.indexOf("#")>=0?M=M.split("#")[1].split("/").pop():M=M.split("/").pop().split(".")[0],encodeURIComponent(m.sanitise(M))}function B(M,$,oe){let G=oe.payload.options;if(s(M,$)){if(!M[$].startsWith("#/components/")){if(M[$]==="#/consumes")delete M[$],oe.parent[oe.pkey]=l(G.openapi.consumes);else if(M[$]==="#/produces")delete M[$],oe.parent[oe.pkey]=l(G.openapi.produces);else if(M[$].startsWith("#/definitions/")){let ce=M[$].replace("#/definitions/","").split("/");const pe=i.jpunescape(ce[0]);let Q=v.schemas[decodeURIComponent(pe)];Q?ce[0]=Q:C("Could not resolve reference "+M[$],M,G),M[$]="#/components/schemas/"+ce.join("/")}else if(M[$].startsWith("#/parameters/"))M[$]="#/components/parameters/"+m.sanitise(M[$].replace("#/parameters/",""));else if(M[$].startsWith("#/responses/"))M[$]="#/components/responses/"+m.sanitise(M[$].replace("#/responses/",""));else if(M[$].startsWith("#")){let ce=l(i.jptr(G.openapi,M[$]));if(ce===!1)C("direct $ref not found "+M[$],M,G);else if(G.refmap[M[$]])M[$]=G.refmap[M[$]];else{let pe=M[$];pe=pe.replace("/properties/headers/",""),pe=pe.replace("/properties/responses/",""),pe=pe.replace("/properties/parameters/",""),pe=pe.replace("/properties/schemas/","");let Q="schemas",re=pe.lastIndexOf("/schema");if(Q=pe.indexOf("/headers/")>re?"headers":pe.indexOf("/responses/")>re?"responses":pe.indexOf("/example")>re?"examples":pe.indexOf("/x-")>re?"extensions":pe.indexOf("/parameters/")>re?"parameters":"schemas",Q==="schemas"&&O(ce,G),Q!=="responses"&&Q!=="extensions"){let de=Q.substr(0,Q.length-1);de==="parameter"&&ce.name&&ce.name===m.sanitise(ce.name)&&(de=encodeURIComponent(ce.name));let fe=1;for(M["x-miro"]&&(de=A(M["x-miro"]),fe="");i.jptr(G.openapi,"#/components/"+Q+"/"+de+fe);)fe=fe===""?2:++fe;let ge="#/components/"+Q+"/"+de+fe,he="";Q==="examples"&&(ce={value:ce},he="/value"),i.jptr(G.openapi,ge,ce),G.refmap[M[$]]=ge+he,M[$]=ge+he}}}}if(delete M["x-miro"],Object.keys(M).length>1){const ce=M[$],pe=oe.path.indexOf("/schema")>=0;G.refSiblings==="preserve"||(pe&&G.refSiblings==="allOf"?(delete M.$ref,oe.parent[oe.pkey]={allOf:[{$ref:ce},M]}):oe.parent[oe.pkey]={$ref:ce})}}if($==="x-ms-odata"&&typeof M[$]=="string"&&M[$].startsWith("#/")){let ce=M[$].replace("#/definitions/","").replace("#/components/schemas/","").split("/"),pe=v.schemas[decodeURIComponent(ce[0])];pe?ce[0]=pe:C("Could not resolve reference "+M[$],M,G),M[$]="#/components/schemas/"+ce.join("/")}}function L(M,$){for(let oe in $.refmap)i.jptr(M,oe,{$ref:$.refmap[oe]})}function q(M){for(let $ in M)for(let oe in M[$]){let G=m.sanitise(oe);oe!==G&&(M[$][G]=M[$][oe],delete M[$][oe])}}function N(M,$){if(M.type==="basic"&&(M.type="http",M.scheme="basic"),M.type==="oauth2"){let oe={},G=M.flow;M.flow==="application"&&(G="clientCredentials"),M.flow==="accessCode"&&(G="authorizationCode"),typeof M.authorizationUrl<"u"&&(oe.authorizationUrl=M.authorizationUrl.split("?")[0].trim()||"/"),typeof M.tokenUrl=="string"&&(oe.tokenUrl=M.tokenUrl.split("?")[0].trim()||"/"),oe.scopes=M.scopes||{},M.flows={},M.flows[G]=oe,delete M.flow,delete M.authorizationUrl,delete M.tokenUrl,delete M.scopes,typeof M.name<"u"&&($.patch?($.patches++,delete M.name):z("(Patchable) oauth2 securitySchemes should not have name property",$))}}function U(M){return M&&!M["x-s2o-delete"]}function D(M,$){if(M.$ref)M.$ref=M.$ref.replace("#/responses/","#/components/responses/");else{M.type&&!M.schema&&(M.schema={}),M.type&&(M.schema.type=M.type),M.items&&M.items.type!=="array"&&(M.items.collectionFormat!==M.collectionFormat&&C("Nested collectionFormats are not supported",M,$),delete M.items.collectionFormat),M.type==="array"?(M.collectionFormat==="ssv"?C("collectionFormat:ssv is no longer supported for headers",M,$):M.collectionFormat==="pipes"?C("collectionFormat:pipes is no longer supported for headers",M,$):M.collectionFormat==="multi"?M.explode=!0:M.collectionFormat==="tsv"?(C("collectionFormat:tsv is no longer supported",M,$),M["x-collectionFormat"]="tsv"):M.style="simple",delete M.collectionFormat):M.collectionFormat&&($.patch?($.patches++,delete M.collectionFormat):z("(Patchable) collectionFormat is only applicable to header.type array",$)),delete M.type;for(let oe of m.parameterTypeProperties)typeof M[oe]<"u"&&(M.schema[oe]=M[oe],delete M[oe]);for(let oe of m.arrayProperties)typeof M[oe]<"u"&&(M.schema[oe]=M[oe],delete M[oe])}}function Y(M,$){if(M.$ref.indexOf("#/parameters/")>=0){let oe=M.$ref.split("#/parameters/");M.$ref=oe[0]+"#/components/parameters/"+m.sanitise(oe[1])}M.$ref.indexOf("#/definitions/")>=0&&C("Definition used as parameter",M,$)}function te(M,$){let oe={};for(let G of Object.keys(M))oe[G]=M[G],G==="parameters"&&(oe.requestBody={},$.rbname&&(oe[$.rbname]=""));return oe.requestBody={},oe}function ue(M,$,oe,G,ce,pe,Q){let re={},de=!0,fe;if($&&$.consumes&&typeof $.consumes=="string")if(Q.patch)Q.patches++,$.consumes=[$.consumes];else return z("(Patchable) operation.consumes must be an array",Q);Array.isArray(pe.consumes)||delete pe.consumes;let ge=(($?$.consumes:null)||pe.consumes||[]).filter(m.uniqueOnly);if(M&&M.$ref&&typeof M.$ref=="string"){Y(M,Q);let he=decodeURIComponent(M.$ref.replace("#/components/parameters/","")),xe=!1,Oe=pe.components.parameters[he];if((!Oe||Oe["x-s2o-delete"])&&M.$ref.startsWith("#/")&&(M["x-s2o-delete"]=!0,xe=!0),xe){let _e=M.$ref,Ye=o(pe,M.$ref);!Ye&&_e.startsWith("#/")?C("Could not resolve reference "+_e,M,Q):Ye&&(M=Ye)}}if(M&&(M.name||M.in)){typeof M["x-deprecated"]=="boolean"&&(M.deprecated=M["x-deprecated"],delete M["x-deprecated"]),typeof M["x-example"]<"u"&&(M.example=M["x-example"],delete M["x-example"]),M.in!=="body"&&!M.type&&(Q.patch?(Q.patches++,M.type="string"):z("(Patchable) parameter.type is mandatory for non-body parameters",Q)),M.type&&typeof M.type=="object"&&M.type.$ref&&(M.type=o(pe,M.type.$ref)),M.type==="file"&&(M["x-s2o-originalType"]=M.type,fe=M.type),M.description&&typeof M.description=="object"&&M.description.$ref&&(M.description=o(pe,M.description.$ref)),M.description===null&&delete M.description;let he=M.collectionFormat;if(M.type==="array"&&!he&&(he="csv"),he&&(M.type!=="array"&&(Q.patch?(Q.patches++,delete M.collectionFormat):z("(Patchable) collectionFormat is only applicable to param.type array",Q)),he==="csv"&&(M.in==="query"||M.in==="cookie")&&(M.style="form",M.explode=!1),he==="csv"&&(M.in==="path"||M.in==="header")&&(M.style="simple"),he==="ssv"&&(M.in==="query"?M.style="spaceDelimited":C("collectionFormat:ssv is no longer supported except for in:query parameters",M,Q)),he==="pipes"&&(M.in==="query"?M.style="pipeDelimited":C("collectionFormat:pipes is no longer supported except for in:query parameters",M,Q)),he==="multi"&&(M.explode=!0),he==="tsv"&&(C("collectionFormat:tsv is no longer supported",M,Q),M["x-collectionFormat"]="tsv"),delete M.collectionFormat),M.type&&M.type!=="body"&&M.in!=="formData")if(M.items&&M.schema)C("parameter has array,items and schema",M,Q);else{M.schema&&Q.patches++,(!M.schema||typeof M.schema!="object")&&(M.schema={}),M.schema.type=M.type,M.items&&(M.schema.items=M.items,delete M.items,u(M.schema.items,null,function(xe,Oe,_e){Oe==="collectionFormat"&&typeof xe[Oe]=="string"&&(he&&xe[Oe]!==he&&C("Nested collectionFormats are not supported",M,Q),delete xe[Oe])}));for(let xe of m.parameterTypeProperties)typeof M[xe]<"u"&&(M.schema[xe]=M[xe]),delete M[xe]}M.schema&&O(M.schema,Q),M["x-ms-skip-url-encoding"]&&M.in==="query"&&(M.allowReserved=!0,delete M["x-ms-skip-url-encoding"])}if(M&&M.in==="formData"){de=!1,re.content={};let he="application/x-www-form-urlencoded";if(ge.length&&ge.indexOf("multipart/form-data")>=0&&(he="multipart/form-data"),re.content[he]={},M.schema)re.content[he].schema=M.schema,M.schema.$ref&&(re["x-s2o-name"]=decodeURIComponent(M.schema.$ref.replace("#/components/schemas/","")));else{re.content[he].schema={},re.content[he].schema.type="object",re.content[he].schema.properties={},re.content[he].schema.properties[M.name]={};let xe=re.content[he].schema,Oe=re.content[he].schema.properties[M.name];M.description&&(Oe.description=M.description),M.example&&(Oe.example=M.example),M.type&&(Oe.type=M.type);for(let _e of m.parameterTypeProperties)typeof M[_e]<"u"&&(Oe[_e]=M[_e]);M.required===!0&&(xe.required||(xe.required=[]),xe.required.push(M.name),re.required=!0),typeof M.default<"u"&&(Oe.default=M.default),Oe.properties&&(Oe.properties=M.properties),M.allOf&&(Oe.allOf=M.allOf),M.type==="array"&&M.items&&(Oe.items=M.items,Oe.items.collectionFormat&&delete Oe.items.collectionFormat),(fe==="file"||M["x-s2o-originalType"]==="file")&&(Oe.type="string",Oe.format="binary"),ne(M,Oe)}}else M&&M.type==="file"&&(M.required&&(re.required=M.required),re.content={},re.content["application/octet-stream"]={},re.content["application/octet-stream"].schema={},re.content["application/octet-stream"].schema.type="string",re.content["application/octet-stream"].schema.format="binary",ne(M,re));if(M&&M.in==="body"){re.content={},M.name&&(re["x-s2o-name"]=($&&$.operationId?m.sanitiseAll($.operationId):"")+("_"+M.name).toCamelCase()),M.description&&(re.description=M.description),M.required&&(re.required=M.required),$&&Q.rbname&&M.name&&($[Q.rbname]=M.name),M.schema&&M.schema.$ref?re["x-s2o-name"]=decodeURIComponent(M.schema.$ref.replace("#/components/schemas/","")):M.schema&&M.schema.type==="array"&&M.schema.items&&M.schema.items.$ref&&(re["x-s2o-name"]=decodeURIComponent(M.schema.items.$ref.replace("#/components/schemas/",""))+"Array"),ge.length||ge.push("application/json");for(let he of ge)re.content[he]={},re.content[he].schema=l(M.schema||{}),O(re.content[he].schema,Q);ne(M,re)}if(Object.keys(re).length>0&&(M["x-s2o-delete"]=!0,$))if($.requestBody&&de){$.requestBody["x-s2o-overloaded"]=!0;let he=$.operationId||ce;C("Operation "+he+" has multiple requestBodies",$,Q)}else $.requestBody||($=oe[G]=te($,Q)),$.requestBody.content&&$.requestBody.content["multipart/form-data"]&&$.requestBody.content["multipart/form-data"].schema&&$.requestBody.content["multipart/form-data"].schema.properties&&re.content["multipart/form-data"]&&re.content["multipart/form-data"].schema&&re.content["multipart/form-data"].schema.properties?($.requestBody.content["multipart/form-data"].schema.properties=Object.assign($.requestBody.content["multipart/form-data"].schema.properties,re.content["multipart/form-data"].schema.properties),$.requestBody.content["multipart/form-data"].schema.required=($.requestBody.content["multipart/form-data"].schema.required||[]).concat(re.content["multipart/form-data"].schema.required||[]),$.requestBody.content["multipart/form-data"].schema.required.length||delete $.requestBody.content["multipart/form-data"].schema.required):$.requestBody.content&&$.requestBody.content["application/x-www-form-urlencoded"]&&$.requestBody.content["application/x-www-form-urlencoded"].schema&&$.requestBody.content["application/x-www-form-urlencoded"].schema.properties&&re.content["application/x-www-form-urlencoded"]&&re.content["application/x-www-form-urlencoded"].schema&&re.content["application/x-www-form-urlencoded"].schema.properties?($.requestBody.content["application/x-www-form-urlencoded"].schema.properties=Object.assign($.requestBody.content["application/x-www-form-urlencoded"].schema.properties,re.content["application/x-www-form-urlencoded"].schema.properties),$.requestBody.content["application/x-www-form-urlencoded"].schema.required=($.requestBody.content["application/x-www-form-urlencoded"].schema.required||[]).concat(re.content["application/x-www-form-urlencoded"].schema.required||[]),$.requestBody.content["application/x-www-form-urlencoded"].schema.required.length||delete $.requestBody.content["application/x-www-form-urlencoded"].schema.required):($.requestBody=Object.assign($.requestBody,re),$.requestBody["x-s2o-name"]||($.requestBody.schema&&$.requestBody.schema.$ref?$.requestBody["x-s2o-name"]=decodeURIComponent($.requestBody.schema.$ref.replace("#/components/schemas/","")).split("/").join(""):$.operationId&&($.requestBody["x-s2o-name"]=m.sanitiseAll($.operationId))));if(M&&!M["x-s2o-delete"]){delete M.type;for(let he of m.parameterTypeProperties)delete M[he];M.in==="path"&&(typeof M.required>"u"||M.required!==!0)&&(Q.patch?(Q.patches++,M.required=!0):z("(Patchable) path parameters must be required:true ["+M.name+" in "+ce+"]",Q))}return $}function ne(M,$){for(let oe in M)oe.startsWith("x-")&&!oe.startsWith("x-s2o")&&($[oe]=M[oe])}function me(M,$,oe,G,ce){if(!M)return!1;if(M.$ref&&typeof M.$ref=="string")M.$ref.indexOf("#/definitions/")>=0?C("definition used as response: "+M.$ref,M,ce):M.$ref.startsWith("#/responses/")&&(M.$ref="#/components/responses/"+m.sanitise(decodeURIComponent(M.$ref.replace("#/responses/",""))));else{if((typeof M.description>"u"||M.description===null||M.description===""&&ce.patch)&&(ce.patch?typeof M=="object"&&!Array.isArray(M)&&(ce.patches++,M.description=g[M]||""):z("(Patchable) response.description is mandatory",ce)),typeof M.schema<"u"){if(O(M.schema,ce),M.schema.$ref&&typeof M.schema.$ref=="string"&&M.schema.$ref.startsWith("#/responses/")&&(M.schema.$ref="#/components/responses/"+m.sanitise(decodeURIComponent(M.schema.$ref.replace("#/responses/","")))),oe&&oe.produces&&typeof oe.produces=="string")if(ce.patch)ce.patches++,oe.produces=[oe.produces];else return z("(Patchable) operation.produces must be an array",ce);G.produces&&!Array.isArray(G.produces)&&delete G.produces;let pe=((oe?oe.produces:null)||G.produces||[]).filter(m.uniqueOnly);pe.length||pe.push("*/*"),M.content={};for(let Q of pe){if(M.content[Q]={},M.content[Q].schema=l(M.schema),M.examples&&M.examples[Q]){let re={};re.value=M.examples[Q],M.content[Q].examples={},M.content[Q].examples.response=re,delete M.examples[Q]}M.content[Q].schema.type==="file"&&(M.content[Q].schema={type:"string",format:"binary"})}delete M.schema}for(let pe in M.examples)M.content||(M.content={}),M.content[pe]||(M.content[pe]={}),M.content[pe].examples={},M.content[pe].examples.response={},M.content[pe].examples.response.value=M.examples[pe];if(delete M.examples,M.headers)for(let pe in M.headers)pe.toLowerCase()==="status code"?ce.patch?(ce.patches++,delete M.headers[pe]):z('(Patchable) "Status Code" is not a valid header',ce):D(M.headers[pe],ce)}}function I(M,$,oe,G,ce){for(let pe in M){let Q=M[pe];Q&&Q["x-trace"]&&typeof Q["x-trace"]=="object"&&(Q.trace=Q["x-trace"],delete Q["x-trace"]),Q&&Q["x-summary"]&&typeof Q["x-summary"]=="string"&&(Q.summary=Q["x-summary"],delete Q["x-summary"]),Q&&Q["x-description"]&&typeof Q["x-description"]=="string"&&(Q.description=Q["x-description"],delete Q["x-description"]),Q&&Q["x-servers"]&&Array.isArray(Q["x-servers"])&&(Q.servers=Q["x-servers"],delete Q["x-servers"]);for(let re in Q)if(m.httpMethods.indexOf(re)>=0||re==="x-amazon-apigateway-any-method"){let de=Q[re];if(de&&de.parameters&&Array.isArray(de.parameters)){if(Q.parameters)for(let fe of Q.parameters)typeof fe.$ref=="string"&&(Y(fe,oe),fe=o(ce,fe.$ref)),!de.parameters.find(function(ge,he,xe){return ge.name===fe.name&&ge.in===fe.in})&&(fe.in==="formData"||fe.in==="body"||fe.type==="file")&&(de=ue(fe,de,Q,re,pe,ce,oe),oe.rbname&&de[oe.rbname]===""&&delete de[oe.rbname]);for(let fe of de.parameters)de=ue(fe,de,Q,re,re+":"+pe,ce,oe);oe.rbname&&de[oe.rbname]===""&&delete de[oe.rbname],oe.debug||de.parameters&&(de.parameters=de.parameters.filter(U))}if(de&&de.security&&q(de.security),typeof de=="object"){if(!de.responses){let fe={};fe.description="Default response",de.responses={default:fe}}for(let fe in de.responses){let ge=de.responses[fe];me(ge,fe,de,ce,oe)}}if(de&&de["x-servers"]&&Array.isArray(de["x-servers"]))de.servers=de["x-servers"],delete de["x-servers"];else if(de&&de.schemes&&de.schemes.length){for(let fe of de.schemes)if((!ce.schemes||ce.schemes.indexOf(fe)<0)&&(de.servers||(de.servers=[]),Array.isArray(ce.servers)))for(let ge of ce.servers){let he=l(ge),xe=a.parse(he.url);xe.protocol=fe,he.url=xe.format(),de.servers.push(he)}}if(oe.debug&&(de["x-s2o-consumes"]=de.consumes||[],de["x-s2o-produces"]=de.produces||[]),de){if(delete de.consumes,delete de.produces,delete de.schemes,de["x-ms-examples"]){for(let fe in de["x-ms-examples"]){let ge=de["x-ms-examples"][fe],he=m.sanitiseAll(fe);if(ge.parameters)for(let xe in ge.parameters){let Oe=ge.parameters[xe];for(let _e of(de.parameters||[]).concat(Q.parameters||[]))_e.$ref&&(_e=i.jptr(ce,_e.$ref)),_e.name===xe&&!_e.example&&(_e.examples||(_e.examples={}),_e.examples[fe]={value:Oe})}if(ge.responses)for(let xe in ge.responses){if(ge.responses[xe].headers)for(let Oe in ge.responses[xe].headers){let _e=ge.responses[xe].headers[Oe];for(let Ye in de.responses[xe].headers)if(Ye===Oe){let E=de.responses[xe].headers[Ye];E.example=_e}}if(ge.responses[xe].body&&(ce.components.examples[he]={value:l(ge.responses[xe].body)},de.responses[xe]&&de.responses[xe].content))for(let Oe in de.responses[xe].content){let _e=de.responses[xe].content[Oe];_e.examples||(_e.examples={}),_e.examples[fe]={$ref:"#/components/examples/"+he}}}}delete de["x-ms-examples"]}if(de.parameters&&de.parameters.length===0&&delete de.parameters,de.requestBody){let fe=de.operationId?m.sanitiseAll(de.operationId):m.sanitiseAll(re+pe).toCamelCase(),ge=m.sanitise(de.requestBody["x-s2o-name"]||fe||"");delete de.requestBody["x-s2o-name"];let he=JSON.stringify(de.requestBody),xe=m.hash(he);if(!G[xe]){let _e={};_e.name=ge,_e.body=de.requestBody,_e.refs=[],G[xe]=_e}let Oe="#/"+$+"/"+encodeURIComponent(i.jpescape(pe))+"/"+re+"/requestBody";G[xe].refs.push(Oe)}}}if(Q&&Q.parameters){for(let re in Q.parameters){let de=Q.parameters[re];ue(de,null,Q,null,pe,ce,oe)}!oe.debug&&Array.isArray(Q.parameters)&&(Q.parameters=Q.parameters.filter(U))}}}function K(M,$){let oe={};v={schemas:{}},M.security&&q(M.security);for(let ce in M.components.securitySchemes){let pe=m.sanitise(ce);ce!==pe&&(M.components.securitySchemes[pe]&&z("Duplicate sanitised securityScheme name "+pe,$),M.components.securitySchemes[pe]=M.components.securitySchemes[ce],delete M.components.securitySchemes[ce]),N(M.components.securitySchemes[pe],$)}for(let ce in M.components.schemas){let pe=m.sanitiseAll(ce),Q="";if(ce!==pe){for(;M.components.schemas[pe+Q];)Q=Q?++Q:2;M.components.schemas[pe+Q]=M.components.schemas[ce],delete M.components.schemas[ce]}v.schemas[ce]=pe+Q,O(M.components.schemas[pe+Q],$)}$.refmap={},u(M,{payload:{options:$}},B),L(M,$);for(let ce in M.components.parameters){let pe=m.sanitise(ce);ce!==pe&&(M.components.parameters[pe]&&z("Duplicate sanitised parameter name "+pe,$),M.components.parameters[pe]=M.components.parameters[ce],delete M.components.parameters[ce]);let Q=M.components.parameters[pe];ue(Q,null,null,null,pe,M,$)}for(let ce in M.components.responses){let pe=m.sanitise(ce);ce!==pe&&(M.components.responses[pe]&&z("Duplicate sanitised response name "+pe,$),M.components.responses[pe]=M.components.responses[ce],delete M.components.responses[ce]);let Q=M.components.responses[pe];if(me(Q,pe,null,M,$),Q.headers)for(let re in Q.headers)re.toLowerCase()==="status code"?$.patch?($.patches++,delete Q.headers[re]):z('(Patchable) "Status Code" is not a valid header',$):D(Q.headers[re],$)}for(let ce in M.components.requestBodies){let pe=M.components.requestBodies[ce],Q=JSON.stringify(pe),re=m.hash(Q),de={};de.name=ce,de.body=pe,de.refs=[],oe[re]=de}if(I(M.paths,"paths",$,oe,M),M["x-ms-paths"]&&I(M["x-ms-paths"],"x-ms-paths",$,oe,M),!$.debug)for(let ce in M.components.parameters)M.components.parameters[ce]["x-s2o-delete"]&&delete M.components.parameters[ce];$.debug&&(M["x-s2o-consumes"]=M.consumes||[],M["x-s2o-produces"]=M.produces||[]),delete M.consumes,delete M.produces,delete M.schemes;let G=[];if(M.components.requestBodies={},!$.resolveInternal){let ce=1;for(let pe in oe){let Q=oe[pe];if(Q.refs.length>1){let re="";for(Q.name||(Q.name="requestBody",re=ce++);G.indexOf(Q.name+re)>=0;)re=re?++re:2;Q.name=Q.name+re,G.push(Q.name),M.components.requestBodies[Q.name]=l(Q.body);for(let de in Q.refs){let fe={};fe.$ref="#/components/requestBodies/"+Q.name,i.jptr(M,Q.refs[de],fe)}}}}return M.components.responses&&Object.keys(M.components.responses).length===0&&delete M.components.responses,M.components.parameters&&Object.keys(M.components.parameters).length===0&&delete M.components.parameters,M.components.examples&&Object.keys(M.components.examples).length===0&&delete M.components.examples,M.components.requestBodies&&Object.keys(M.components.requestBodies).length===0&&delete M.components.requestBodies,M.components.securitySchemes&&Object.keys(M.components.securitySchemes).length===0&&delete M.components.securitySchemes,M.components.headers&&Object.keys(M.components.headers).length===0&&delete M.components.headers,M.components.schemas&&Object.keys(M.components.schemas).length===0&&delete M.components.schemas,M.components&&Object.keys(M.components).length===0&&delete M.components,M}function W(M){return!M||!M.url||typeof M.url!="string"||(M.url=M.url.split("{{").join("{"),M.url=M.url.split("}}").join("}"),M.url.replace(/\{(.+?)\}/g,function($,oe){M.variables||(M.variables={}),M.variables[oe]={default:"unknown"}})),M}function V(M,$,oe){if(typeof M.info>"u"||M.info===null)if($.patch)$.patches++,M.info={version:"",title:""};else return oe(new k("(Patchable) info object is mandatory"));if(typeof M.info!="object"||Array.isArray(M.info))return oe(new k("info must be an object"));if(typeof M.info.title>"u"||M.info.title===null)if($.patch)$.patches++,M.info.title="";else return oe(new k("(Patchable) info.title cannot be null"));if(typeof M.info.version>"u"||M.info.version===null)if($.patch)$.patches++,M.info.version="";else return oe(new k("(Patchable) info.version cannot be null"));if(typeof M.info.version!="string")if($.patch)$.patches++,M.info.version=M.info.version.toString();else return oe(new k("(Patchable) info.version must be a string"));if(typeof M.info.logo<"u")if($.patch)$.patches++,M.info["x-logo"]=M.info.logo,delete M.info.logo;else return oe(new k("(Patchable) info should not have logo property"));if(typeof M.info.termsOfService<"u"){if(M.info.termsOfService===null)if($.patch)$.patches++,M.info.termsOfService="";else return oe(new k("(Patchable) info.termsOfService cannot be null"));try{new URL(M.info.termsOfService)}catch{if($.patch)$.patches++,delete M.info.termsOfService;else return oe(new k("(Patchable) info.termsOfService must be a URL"))}}}function P(M,$,oe){if(typeof M.paths>"u")if($.patch)$.patches++,M.paths={};else return oe(new k("(Patchable) paths object is mandatory"))}function _(M,$){const oe=new WeakSet;u(M,{identityDetection:!0},function(G,ce,pe){typeof G[ce]=="object"&&G[ce]!==null&&(oe.has(G[ce])?$.anchors?G[ce]=l(G[ce]):z("YAML anchor or merge key at "+pe.path,$):oe.add(G[ce]))})}function F(M,$,oe){return t(oe,new Promise(function(G,ce){if(M||(M={}),$.original=M,$.text||($.text=n.stringify(M)),$.externals=[],$.externalRefs={},$.rewriteRefs=!0,$.preserveMiro=!0,$.promise={},$.promise.resolve=G,$.promise.reject=ce,$.patches=0,$.cache||($.cache={}),$.source&&($.cache[$.source]=$.original),_(M,$),M.openapi&&typeof M.openapi=="string"&&M.openapi.startsWith("3.")){$.openapi=c(M),V($.openapi,$,ce),P($.openapi,$,ce),d.optionalResolve($).then(function(){return $.direct?G($.openapi):G($)}).catch(function(Q){console.warn(Q),ce(Q)});return}if(!M.swagger||M.swagger!="2.0")return ce(new k("Unsupported swagger/OpenAPI version: "+(M.openapi?M.openapi:M.swagger)));let pe=$.openapi={};if(pe.openapi=typeof $.targetVersion=="string"&&$.targetVersion.startsWith("3.")?$.targetVersion:y,$.origin){pe["x-origin"]||(pe["x-origin"]=[]);let Q={};Q.url=$.source||$.origin,Q.format="swagger",Q.version=M.swagger,Q.converter={},Q.converter.url="https://github.com/mermade/oas-kit",Q.converter.version=b,pe["x-origin"].push(Q)}if(pe=Object.assign(pe,c(M)),delete pe.swagger,u(pe,{},function(Q,re,de){Q[re]===null&&!re.startsWith("x-")&&re!=="default"&&de.path.indexOf("/example")<0&&delete Q[re]}),M.host)for(let Q of Array.isArray(M.schemes)?M.schemes:[""]){let re={},de=(M.basePath||"").replace(/\/$/,"");re.url=(Q?Q+":":"")+"//"+M.host+de,W(re),pe.servers||(pe.servers=[]),pe.servers.push(re)}else if(M.basePath){let Q={};Q.url=M.basePath,W(Q),pe.servers||(pe.servers=[]),pe.servers.push(Q)}if(delete pe.host,delete pe.basePath,pe["x-servers"]&&Array.isArray(pe["x-servers"])&&(pe.servers=pe["x-servers"],delete pe["x-servers"]),M["x-ms-parameterized-host"]){let Q=M["x-ms-parameterized-host"],re={};re.url=Q.hostTemplate+(M.basePath?M.basePath:""),re.variables={};const de=re.url.match(/\{\w+\}/g);for(let fe in Q.parameters){let ge=Q.parameters[fe];ge.$ref&&(ge=l(o(pe,ge.$ref))),fe.startsWith("x-")||(delete ge.required,delete ge.type,delete ge.in,typeof ge.default>"u"&&(ge.enum?ge.default=ge.enum[0]:ge.default="none"),ge.name||(ge.name=de[fe].replace("{","").replace("}","")),re.variables[ge.name]=ge,delete ge.name)}pe.servers||(pe.servers=[]),Q.useSchemePrefix===!1?pe.servers.push(re):M.schemes.forEach(fe=>{pe.servers.push(Object.assign({},re,{url:fe+"://"+re.url}))}),delete pe["x-ms-parameterized-host"]}V(pe,$,ce),P(pe,$,ce),typeof pe.consumes=="string"&&(pe.consumes=[pe.consumes]),typeof pe.produces=="string"&&(pe.produces=[pe.produces]),pe.components={},pe["x-callbacks"]&&(pe.components.callbacks=pe["x-callbacks"],delete pe["x-callbacks"]),pe.components.examples={},pe.components.headers={},pe["x-links"]&&(pe.components.links=pe["x-links"],delete pe["x-links"]),pe.components.parameters=pe.parameters||{},pe.components.responses=pe.responses||{},pe.components.requestBodies={},pe.components.securitySchemes=pe.securityDefinitions||{},pe.components.schemas=pe.definitions||{},delete pe.definitions,delete pe.responses,delete pe.parameters,delete pe.securityDefinitions,d.optionalResolve($).then(function(){K($.openapi,$),$.direct?G($.openapi):G($)}).catch(function(Q){console.warn(Q),ce(Q)})}))}function ee(M,$,oe){return t(oe,new Promise(function(G,ce){let pe=null,Q=null;try{pe=JSON.parse(M),$.text=JSON.stringify(pe,null,2)}catch(re){Q=re;try{pe=n.parse(M,{schema:"core",prettyErrors:!0}),$.sourceYaml=!0,$.text=M}catch(de){Q=de}}pe?F(pe,$).then(re=>G(re)).catch(re=>ce(re)):ce(new k(Q?Q.message:"Could not parse string"))}))}function ie(M,$,oe){return t(oe,new Promise(function(G,ce){$.origin=!0,$.source||($.source=M),$.verbose&&console.warn("GET "+M),$.fetch||($.fetch=r);const pe=Object.assign({},$.fetchOptions,{agent:$.agent});$.fetch(M,pe).then(function(Q){if(Q.status!==200)throw new k(`Received status code ${Q.status}: ${M}`);return Q.text()}).then(function(Q){ee(Q,$).then(re=>G(re)).catch(re=>ce(re))}).catch(function(Q){ce(Q)})}))}function be(M,$,oe){return t(oe,new Promise(function(G,ce){e.readFile(M,$.encoding||"utf8",function(pe,Q){pe?ce(pe):($.sourceFile=M,ee(Q,$).then(re=>G(re)).catch(re=>ce(re)))})}))}function X(M,$,oe){return t(oe,new Promise(function(G,ce){let pe="";M.on("data",function(Q){pe+=Q}).on("end",function(){ee(pe,$).then(Q=>G(Q)).catch(Q=>ce(Q))})}))}return T7={S2OError:k,targetVersion:y,convert:F,convertObj:F,convertUrl:ie,convertStr:ee,convertFile:be,convertStream:X},T7}var dta=uta();const pta=Vr(dta);function hta(e){return e.paths||(e.paths={}),new Promise((a,t)=>pta.convertObj(e,{patch:!0,warnOnly:!0,text:"{}",anchors:!0},(r,n)=>{if(r)return t(r);a(n?.openapi)}))}async function mta(){try{return(await ate())?.resolvedConfig.openapi||{}}catch{return{}}}async function fta(e){const a=await ate(),t={config:a,base:Uc?window.location.origin:typeof globalThis.process<"u"?globalThis.process.cwd():""};Uc&&(a.resolve.http.customFetch=globalThis.fetch),typeof e=="object"&&e!==null?t.doc=gta(e):t.ref=e;const{bundle:{parsed:r}}=await Eaa(t);return r.swagger!==void 0?hta(r):r}function gta(e){return{source:{absoluteRef:""},parsed:e}}async function vta(e,a,t){let r;if(t?.skipBundle){if(!e)throw new Error('spec must be specified when using "skipBundleAndConvert"');r=e}else r=await fta(e||a);try{UFe(r)}catch{}return r}const bta=({options:e,definitionUrl:a,definition:t,activeSampleLanguage:r,children:n})=>{const[i,o]=R.useState(),[s,l]=R.useState(!0),[c,u]=R.useState(null),[d,p]=R.useState(e||{});R.useEffect(()=>{async function g(){l(!0);try{const b=await mta();p({...e,...b}),u(await vta(t,a,e))}catch(b){o(b.message)}}g()},[t,a,e]);const m=R.useMemo(()=>{if(c)return{definition:c,options:d,definitionUrl:a,activeSampleLanguage:r}},WFe([c,a,d]));return R.useEffect(()=>{m&&l(!1)},[m]),i||!m?null:s?Xs(e?.hideLoading,!1)?null:h.jsx(QZe,{color:"--loading-spinner-color"}):R.isValidElement(n)?R.cloneElement(n,{store:m}):null};function yta({definition:e,definitionUrl:a,options:t={},activeItemId:r,activeSampleLanguage:n,activeDeepLink:i,router:o}){return h.jsx(bta,{definition:e,definitionUrl:a,options:t,activeItemId:r,activeSampleLanguage:n,activeDeepLink:i,children:h.jsx(See,{withCommonStyles:!0,router:o||"hash"})})}function kta(e){const a={},t=e.attributes;for(let r=0;r<t.length;r++){const n=t[r];a[n.name]=n.value}return a}function xta(e){const a=kta(e),t={};for(const r in a){const n=r.replace(/-(.)/g,(i,o)=>o.toUpperCase());t[n]=a[r]}return t}function wta(e,a=document.querySelector("redoc")){aG.hydrateRoot(a,h.jsx(See,{store:e}),{onRecoverableError:(t,r)=>{t.message.includes("Minified React error #418")||console.error(t.message,r)}})}function gre(e,a={},t=O4("redoc")){if(t===null)throw new Error('"element" argument is not provided and <redoc> tag is not found on the page');const{router:r,...n}={...a,...xta(t)};let i,o;typeof e=="string"?i=e:typeof e=="object"&&(o=e),aG.createRoot(t).render(R.createElement(yta,{definition:o,definitionUrl:i,options:n,router:r??"hash"},["Loading..."]))}const zta="3.16.0-next.1",Sta="caf28959";function Cta(){const e=O4("redoc");if(!e)return;const a=e.getAttribute("spec-url");a&&gre(a,{},e)}Cta();function p1(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var vre={exports:{}};/*!
|
|
10278
10278
|
|
|
10279
10279
|
JSZip v3.10.1 - A JavaScript class for generating and reading zip files
|
|
10280
10280
|
<http://stuartk.com/jszip>
|
|
@@ -11898,7 +11898,7 @@ html body {
|
|
|
11898
11898
|
`),C+="`"+Dzt(z)+"`: "+k),c([C])}return null})},e})();function ID(e){if(e){var a=e.replace(/([^\n\r])(\r?\n)([^\n\r])/gm,`$1
|
|
11899
11899
|
|
|
11900
11900
|
$3`);return a.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}}function Dzt(e){return e.indexOf("`")!==-1?"`` "+e+" ``":e}var $zt=(function(){var e=function(a,t){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)n.hasOwnProperty(i)&&(r[i]=n[i])},e(a,t)};return function(a,t){e(a,t);function r(){this.constructor=a}a.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}})(),Xn,yx;if(typeof process=="object")yx=!1;else if(typeof navigator=="object"){var Izt=navigator.userAgent;yx=Izt.indexOf("Windows")>=0}var Kzt=/^\w[\w\d+.-]*$/,Vzt=/^\//,Hzt=/^\/\//;function Fzt(e,a){if(!e.scheme&&a)throw new Error('[UriError]: Scheme is missing: {scheme: "", authority: "'+e.authority+'", path: "'+e.path+'", query: "'+e.query+'", fragment: "'+e.fragment+'"}');if(e.scheme&&!Kzt.test(e.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(e.path){if(e.authority){if(!Vzt.test(e.path))throw new Error('[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash ("/") character')}else if(Hzt.test(e.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}}function Gzt(e,a){return!e&&!a?"file":e}function qzt(e,a){switch(e){case"https":case"http":case"file":a?a[0]!==Ec&&(a=Ec+a):a=Ec;break}return a}var Jr="",Ec="/",Jzt=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/,KD=(function(){function e(a,t,r,n,i,o){o===void 0&&(o=!1),typeof a=="object"?(this.scheme=a.scheme||Jr,this.authority=a.authority||Jr,this.path=a.path||Jr,this.query=a.query||Jr,this.fragment=a.fragment||Jr):(this.scheme=Gzt(a,o),this.authority=t||Jr,this.path=qzt(this.scheme,r||Jr),this.query=n||Jr,this.fragment=i||Jr,Fzt(this,o))}return e.isUri=function(a){return a instanceof e?!0:a?typeof a.authority=="string"&&typeof a.fragment=="string"&&typeof a.path=="string"&&typeof a.query=="string"&&typeof a.scheme=="string"&&typeof a.fsPath=="function"&&typeof a.with=="function"&&typeof a.toString=="function":!1},Object.defineProperty(e.prototype,"fsPath",{get:function(){return sSe(this)},enumerable:!0,configurable:!0}),e.prototype.with=function(a){if(!a)return this;var t=a.scheme,r=a.authority,n=a.path,i=a.query,o=a.fragment;return t===void 0?t=this.scheme:t===null&&(t=Jr),r===void 0?r=this.authority:r===null&&(r=Jr),n===void 0?n=this.path:n===null&&(n=Jr),i===void 0?i=this.query:i===null&&(i=Jr),o===void 0?o=this.fragment:o===null&&(o=Jr),t===this.scheme&&r===this.authority&&n===this.path&&i===this.query&&o===this.fragment?this:new Sb(t,r,n,i,o)},e.parse=function(a,t){t===void 0&&(t=!1);var r=Jzt.exec(a);return r?new Sb(r[2]||Jr,LM(r[4]||Jr),LM(r[5]||Jr),LM(r[7]||Jr),LM(r[9]||Jr),t):new Sb(Jr,Jr,Jr,Jr,Jr)},e.file=function(a){var t=Jr;if(yx&&(a=a.replace(/\\/g,Ec)),a[0]===Ec&&a[1]===Ec){var r=a.indexOf(Ec,2);r===-1?(t=a.substring(2),a=Ec):(t=a.substring(2,r),a=a.substring(r)||Ec)}return new Sb("file",t,a,Jr,Jr)},e.from=function(a){return new Sb(a.scheme,a.authority,a.path,a.query,a.fragment)},e.prototype.toString=function(a){return a===void 0&&(a=!1),VD(this,a)},e.prototype.toJSON=function(){return this},e.revive=function(a){if(a){if(a instanceof e)return a;var t=new Sb(a);return t._formatted=a.external,t._fsPath=a._sep===nSe?a.fsPath:null,t}else return a},e})(),nSe=yx?1:void 0,Sb=(function(e){$zt(a,e);function a(){var t=e!==null&&e.apply(this,arguments)||this;return t._formatted=null,t._fsPath=null,t}return Object.defineProperty(a.prototype,"fsPath",{get:function(){return this._fsPath||(this._fsPath=sSe(this)),this._fsPath},enumerable:!0,configurable:!0}),a.prototype.toString=function(t){return t===void 0&&(t=!1),t?VD(this,!0):(this._formatted||(this._formatted=VD(this,!1)),this._formatted)},a.prototype.toJSON=function(){var t={$mid:1};return this._fsPath&&(t.fsPath=this._fsPath,t._sep=nSe),this._formatted&&(t.external=this._formatted),this.path&&(t.path=this.path),this.scheme&&(t.scheme=this.scheme),this.authority&&(t.authority=this.authority),this.query&&(t.query=this.query),this.fragment&&(t.fragment=this.fragment),t},a})(KD),iSe=(Xn={},Xn[58]="%3A",Xn[47]="%2F",Xn[63]="%3F",Xn[35]="%23",Xn[91]="%5B",Xn[93]="%5D",Xn[64]="%40",Xn[33]="%21",Xn[36]="%24",Xn[38]="%26",Xn[39]="%27",Xn[40]="%28",Xn[41]="%29",Xn[42]="%2A",Xn[43]="%2B",Xn[44]="%2C",Xn[59]="%3B",Xn[61]="%3D",Xn[32]="%20",Xn);function oSe(e,a){for(var t=void 0,r=-1,n=0;n<e.length;n++){var i=e.charCodeAt(n);if(i>=97&&i<=122||i>=65&&i<=90||i>=48&&i<=57||i===45||i===46||i===95||i===126||a&&i===47)r!==-1&&(t+=encodeURIComponent(e.substring(r,n)),r=-1),t!==void 0&&(t+=e.charAt(n));else{t===void 0&&(t=e.substr(0,n));var o=iSe[i];o!==void 0?(r!==-1&&(t+=encodeURIComponent(e.substring(r,n)),r=-1),t+=o):r===-1&&(r=n)}}return r!==-1&&(t+=encodeURIComponent(e.substring(r))),t!==void 0?t:e}function Uzt(e){for(var a=void 0,t=0;t<e.length;t++){var r=e.charCodeAt(t);r===35||r===63?(a===void 0&&(a=e.substr(0,t)),a+=iSe[r]):a!==void 0&&(a+=e[t])}return a!==void 0?a:e}function sSe(e,a){var t;return e.authority&&e.path.length>1&&e.scheme==="file"?t="//"+e.authority+e.path:e.path.charCodeAt(0)===47&&(e.path.charCodeAt(1)>=65&&e.path.charCodeAt(1)<=90||e.path.charCodeAt(1)>=97&&e.path.charCodeAt(1)<=122)&&e.path.charCodeAt(2)===58?t=e.path[1].toLowerCase()+e.path.substr(2):t=e.path,yx&&(t=t.replace(/\//g,"\\")),t}function VD(e,a){var t=a?Uzt:oSe,r="",n=e.scheme,i=e.authority,o=e.path,s=e.query,l=e.fragment;if(n&&(r+=n,r+=":"),(i||n==="file")&&(r+=Ec,r+=Ec),i){var c=i.indexOf("@");if(c!==-1){var u=i.substr(0,c);i=i.substr(c+1),c=u.indexOf(":"),c===-1?r+=t(u,!1):(r+=t(u.substr(0,c),!1),r+=":",r+=t(u.substr(c+1),!1)),r+="@"}i=i.toLowerCase(),c=i.indexOf(":"),c===-1?r+=t(i,!1):(r+=t(i.substr(0,c),!1),r+=i.substr(c))}if(o){if(o.length>=3&&o.charCodeAt(0)===47&&o.charCodeAt(2)===58){var d=o.charCodeAt(1);d>=65&&d<=90&&(o="/"+String.fromCharCode(d+32)+":"+o.substr(3))}else if(o.length>=2&&o.charCodeAt(1)===58){var d=o.charCodeAt(0);d>=65&&d<=90&&(o=String.fromCharCode(d+32)+":"+o.substr(2))}r+=t(o,!0)}return s&&(r+="?",r+=t(s,!1)),l&&(r+="#",r+=a?l:oSe(l,!1)),r}function lSe(e){try{return decodeURIComponent(e)}catch{return e.length>3?e.substr(0,3)+lSe(e.substr(3)):e}}var cSe=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function LM(e){return e.match(cSe)?e.replace(cSe,function(a){return lSe(a)}):e}var Wzt=(function(){function e(a){try{this.patternRegExp=new RegExp(Ezt(a)+"$")}catch{this.patternRegExp=null}this.schemas=[]}return e.prototype.addSchema=function(a){this.schemas.push(a)},e.prototype.matchesPattern=function(a){return this.patternRegExp&&this.patternRegExp.test(a)},e.prototype.getSchemas=function(){return this.schemas},e})(),Zzt=(function(){function e(a,t,r){this.service=a,this.url=t,this.dependencies={},r&&(this.unresolvedSchema=this.service.promise.resolve(new Cb(r)))}return e.prototype.getUnresolvedSchema=function(){return this.unresolvedSchema||(this.unresolvedSchema=this.service.loadSchema(this.url)),this.unresolvedSchema},e.prototype.getResolvedSchema=function(){var a=this;return this.resolvedSchema||(this.resolvedSchema=this.getUnresolvedSchema().then(function(t){return a.service.resolveSchemaContent(t,a.url,a.dependencies)})),this.resolvedSchema},e.prototype.clearSchema=function(){this.resolvedSchema=null,this.unresolvedSchema=null,this.dependencies={}},e})(),Cb=(function(){function e(a,t){t===void 0&&(t=[]),this.schema=a,this.errors=t}return e})(),uSe=(function(){function e(a,t){t===void 0&&(t=[]),this.schema=a,this.errors=t}return e.prototype.getSection=function(a){return Rs(this.getSectionRecursive(a,this.schema))},e.prototype.getSectionRecursive=function(a,t){if(!t||typeof t=="boolean"||a.length===0)return t;var r=a.shift();if(t.properties&&typeof t.properties[r])return this.getSectionRecursive(a,t.properties[r]);if(t.patternProperties)for(var n=0,i=Object.keys(t.patternProperties);n<i.length;n++){var o=i[n],s=new RegExp(o);if(s.test(r))return this.getSectionRecursive(a,t.patternProperties[o])}else{if(typeof t.additionalProperties=="object")return this.getSectionRecursive(a,t.additionalProperties);if(r.match("[0-9]+")){if(Array.isArray(t.items)){var l=parseInt(r,10);if(!isNaN(l)&&t.items[l])return this.getSectionRecursive(a,t.items[l])}else if(t.items)return this.getSectionRecursive(a,t.items)}}return null},e})(),Qzt=(function(){function e(a,t,r){this.contextService=t,this.requestService=a,this.promiseConstructor=r||Promise,this.callOnDispose=[],this.contributionSchemas={},this.contributionAssociations={},this.schemasById={},this.filePatternAssociations=[],this.filePatternAssociationById={},this.registeredSchemasIds={}}return e.prototype.getRegisteredSchemaIds=function(a){return Object.keys(this.registeredSchemasIds).filter(function(t){var r=KD.parse(t).scheme;return r!=="schemaservice"&&(!a||a(r))})},Object.defineProperty(e.prototype,"promise",{get:function(){return this.promiseConstructor},enumerable:!0,configurable:!0}),e.prototype.dispose=function(){for(;this.callOnDispose.length>0;)this.callOnDispose.pop()()},e.prototype.onResourceChange=function(a){var t=this,r=!1;a=this.normalizeId(a);for(var n=[a],i=Object.keys(this.schemasById).map(function(c){return t.schemasById[c]});n.length;)for(var o=n.pop(),s=0;s<i.length;s++){var l=i[s];l&&(l.url===o||l.dependencies[o])&&(l.url!==o&&n.push(l.url),l.clearSchema(),i[s]=void 0,r=!0)}return r},e.prototype.normalizeId=function(a){try{return KD.parse(a).toString()}catch{return a}},e.prototype.setSchemaContributions=function(a){if(a.schemas){var t=a.schemas;for(var r in t){var n=this.normalizeId(r);this.contributionSchemas[n]=this.addSchemaHandle(n,t[r])}}if(a.schemaAssociations){var i=a.schemaAssociations;for(var o in i){var s=i[o];this.contributionAssociations[o]=s;for(var l=this.getOrAddFilePatternAssociation(o),c=0,u=s;c<u.length;c++){var d=u[c],r=this.normalizeId(d);l.addSchema(r)}}}},e.prototype.addSchemaHandle=function(a,t){var r=new Zzt(this,a,t);return this.schemasById[a]=r,r},e.prototype.getOrAddSchemaHandle=function(a,t){return this.schemasById[a]||this.addSchemaHandle(a,t)},e.prototype.getOrAddFilePatternAssociation=function(a){var t=this.filePatternAssociationById[a];return t||(t=new Wzt(a),this.filePatternAssociationById[a]=t,this.filePatternAssociations.push(t)),t},e.prototype.registerExternalSchema=function(a,t,r){t===void 0&&(t=null);var n=this.normalizeId(a);if(this.registeredSchemasIds[n]=!0,t)for(var i=0,o=t;i<o.length;i++){var s=o[i];this.getOrAddFilePatternAssociation(s).addSchema(n)}return r?this.addSchemaHandle(n,r):this.getOrAddSchemaHandle(n)},e.prototype.clearExternalSchemas=function(){this.schemasById={},this.filePatternAssociations=[],this.filePatternAssociationById={},this.registeredSchemasIds={};for(var a in this.contributionSchemas)this.schemasById[a]=this.contributionSchemas[a],this.registeredSchemasIds[a]=!0;for(var t in this.contributionAssociations)for(var r=this.getOrAddFilePatternAssociation(t),n=0,i=this.contributionAssociations[t];n<i.length;n++){var o=i[n],a=this.normalizeId(o);r.addSchema(a)}},e.prototype.getResolvedSchema=function(a){var t=this.normalizeId(a),r=this.schemasById[t];return r?r.getResolvedSchema():this.promise.resolve(null)},e.prototype.loadSchema=function(a){if(!this.requestService){var t="Unable to load schema from '"+a+"'. No schema request service available";return this.promise.resolve(new Cb({},[t]))}return this.requestService(a).then(function(r){if(!r){var n="Unable to load schema from '"+a+"': No content.";return new Cb({},[n])}var i={},o=[];i=fzt(r,o);var s=o.length?["Unable to parse content from '"+a+"': Parse error at offset "+o[0].offset]:[];return new Cb(i,s)},function(r){var n="Unable to load schema from '"+a+"': "+r.toString();return new Cb({},[n])})},e.prototype.resolveSchemaContent=function(a,t,r){var n=this,i=a.errors.slice(0),o=a.schema;if(o.$schema){var s=this.normalizeId(o.$schema);if(s==="http://json-schema.org/draft-03/schema")return this.promise.resolve(new uSe({},["Draft-03 schemas are not supported."]));s==="https://json-schema.org/draft/2019-09/schema"&&a.errors.push("Draft 2019-09 schemas are not yet fully supported.")}var l=this.contextService,c=function(m,g){if(!g)return m;var b=m;return g[0]==="/"&&(g=g.substr(1)),g.split("/").some(function(y){return b=b[y],!b}),b},u=function(m,g,b,y){var v=c(g,y);if(v)for(var k in v)v.hasOwnProperty(k)&&!m.hasOwnProperty(k)&&(m[k]=v[k]);else i.push("$ref '"+y+"' in '"+b+"' can not be resolved.")},d=function(m,g,b,y,v){l&&!/^\w+:\/\/.*/.test(g)&&(g=l.resolveRelativePath(g,y)),g=n.normalizeId(g);var k=n.getOrAddSchemaHandle(g);return k.getUnresolvedSchema().then(function(z){if(v[g]=!0,z.errors.length){var C=b?g+"#"+b:g;i.push("Problems loading reference '"+C+"': "+z.errors[0]+".")}return u(m,z.schema,g,b),p(m,z.schema,g,k.dependencies)})},p=function(m,g,b,y){if(!m||typeof m!="object")return Promise.resolve(null);for(var v=[m],k=[],z=[],C=function(){for(var B=[],L=0;L<arguments.length;L++)B[L]=arguments[L];for(var q=0,N=B;q<N.length;q++){var U=N[q];typeof U=="object"&&v.push(U)}},w=function(){for(var B=[],L=0;L<arguments.length;L++)B[L]=arguments[L];for(var q=0,N=B;q<N.length;q++){var U=N[q];if(typeof U=="object")for(var D in U){var Y=U[D];typeof Y=="object"&&v.push(Y)}}},S=function(){for(var B=[],L=0;L<arguments.length;L++)B[L]=arguments[L];for(var q=0,N=B;q<N.length;q++){var U=N[q];if(Array.isArray(U))for(var D=0,Y=U;D<Y.length;D++){var te=Y[D];typeof te=="object"&&v.push(te)}}},O=function(B){for(var L=[];B.$ref;){var q=B.$ref,N=q.split("#",2);if(delete B.$ref,N[0].length>0){z.push(d(B,N[0],N[1],b,y));return}else L.indexOf(q)===-1&&(u(B,g,b,N[1]),L.push(q))}C(B.items,B.additionalProperties,B.not,B.contains,B.propertyNames,B.if,B.then,B.else),w(B.definitions,B.properties,B.patternProperties,B.dependencies),S(B.anyOf,B.allOf,B.oneOf,B.items)};v.length;){var A=v.pop();k.indexOf(A)>=0||(k.push(A),O(A))}return n.promise.all(z)};return p(o,o,t,r).then(function(m){return new uSe(o,i)})},e.prototype.getSchemaForResource=function(a,t){if(t&&t.root&&t.root.type==="object"){var r=t.root.properties.filter(function(g){return g.keyNode.value==="$schema"&&g.valueNode&&g.valueNode.type==="string"});if(r.length>0){var n=jh(r[0].valueNode);if(n&&Bzt(n,".")&&this.contextService&&(n=this.contextService.resolveRelativePath(n,a)),n){var i=this.normalizeId(n);return this.getOrAddSchemaHandle(i).getResolvedSchema()}}}for(var o=Object.create(null),s=[],l=0,c=this.filePatternAssociations;l<c.length;l++){var u=c[l];if(u.matchesPattern(a))for(var d=0,p=u.getSchemas();d<p.length;d++){var m=p[d];o[m]||(s.push(m),o[m]=!0)}}return s.length>0?this.createCombinedSchema(a,s).getResolvedSchema():this.promise.resolve(null)},e.prototype.createCombinedSchema=function(a,t){if(t.length===1)return this.getOrAddSchemaHandle(t[0]);var r="schemaservice://combinedSchema/"+encodeURIComponent(a),n={allOf:t.map(function(i){return{$ref:i}})};return this.addSchemaHandle(r,n)},e})(),Xzt=(function(){function e(a,t){this.jsonSchemaService=a,this.promise=t,this.validationEnabled=!0}return e.prototype.configure=function(a){a&&(this.validationEnabled=a.validate,this.commentSeverity=a.allowComments?void 0:St.Error)},e.prototype.doValidation=function(a,t,r,n){var i=this;if(!this.validationEnabled)return this.promise.resolve([]);var o=[],s={},l=function(d){var p=d.range.start.line+" "+d.range.start.character+" "+d.message;s[p]||(s[p]=!0,o.push(d))},c=function(d){var p=r?hSe(r.trailingCommas):St.Error,m=r?hSe(r.comments):i.commentSeverity;if(d){if(d.errors.length&&t.root){var g=t.root,b=g.type==="object"?g.properties[0]:null;if(b&&b.keyNode.value==="$schema"){var y=b.valueNode||b,v=lr.create(a.positionAt(y.offset),a.positionAt(y.offset+y.length));l(Dd.create(v,d.errors[0],St.Warning,rr.SchemaResolveError))}else{var v=lr.create(a.positionAt(g.offset),a.positionAt(g.offset+1));l(Dd.create(v,d.errors[0],St.Warning,rr.SchemaResolveError))}}else{var k=t.validate(a,d.schema);k&&k.forEach(l)}dSe(d.schema)&&(m=void 0),pSe(d.schema)&&(p=void 0)}for(var z=0,C=t.syntaxErrors;z<C.length;z++){var w=C[z];if(w.code===rr.TrailingComma){if(typeof p!="number")continue;w.severity=p}l(w)}if(typeof m=="number"){var S="Comments are not permitted in JSON.";t.comments.forEach(function(O){l(Dd.create(O,S,m,rr.CommentNotPermitted))})}return o};if(n){var u=n.id||"schemaservice://untitled/"+Yzt++;return this.jsonSchemaService.resolveSchemaContent(new Cb(n),u,{}).then(function(d){return c(d)})}return this.jsonSchemaService.getSchemaForResource(a.uri,t).then(function(d){return c(d)})},e})(),Yzt=0;function dSe(e){if(e&&typeof e=="object"){if(Tu(e.allowComments))return e.allowComments;if(e.allOf)for(var a=0,t=e.allOf;a<t.length;a++){var r=t[a],n=dSe(r);if(Tu(n))return n}}}function pSe(e){if(e&&typeof e=="object"){if(Tu(e.allowTrailingCommas))return e.allowTrailingCommas;if(Tu(e.allowsTrailingCommas))return e.allowsTrailingCommas;if(e.allOf)for(var a=0,t=e.allOf;a<t.length;a++){var r=t[a],n=pSe(r);if(Tu(n))return n}}}function hSe(e){switch(e){case"error":return St.Error;case"warning":return St.Warning;case"ignore":return}}var mSe=48,eSt=57,aSt=65,RM=97,tSt=102;function Yn(e){return e<mSe?0:e<=eSt?e-mSe:(e<RM&&(e+=RM-aSt),e>=RM&&e<=tSt?e-RM+10:0)}function rSt(e){if(e[0]!=="#")return null;switch(e.length){case 4:return{red:Yn(e.charCodeAt(1))*17/255,green:Yn(e.charCodeAt(2))*17/255,blue:Yn(e.charCodeAt(3))*17/255,alpha:1};case 5:return{red:Yn(e.charCodeAt(1))*17/255,green:Yn(e.charCodeAt(2))*17/255,blue:Yn(e.charCodeAt(3))*17/255,alpha:Yn(e.charCodeAt(4))*17/255};case 7:return{red:(Yn(e.charCodeAt(1))*16+Yn(e.charCodeAt(2)))/255,green:(Yn(e.charCodeAt(3))*16+Yn(e.charCodeAt(4)))/255,blue:(Yn(e.charCodeAt(5))*16+Yn(e.charCodeAt(6)))/255,alpha:1};case 9:return{red:(Yn(e.charCodeAt(1))*16+Yn(e.charCodeAt(2)))/255,green:(Yn(e.charCodeAt(3))*16+Yn(e.charCodeAt(4)))/255,blue:(Yn(e.charCodeAt(5))*16+Yn(e.charCodeAt(6)))/255,alpha:(Yn(e.charCodeAt(7))*16+Yn(e.charCodeAt(8)))/255}}return null}var nSt=(function(){function e(a){this.schemaService=a}return e.prototype.findDocumentSymbols=function(a,t,r){var n=this;r===void 0&&(r={resultLimit:Number.MAX_VALUE});var i=t.root;if(!i)return null;var o=r.resultLimit,s=a.uri;if((s==="vscode://defaultsettings/keybindings.json"||$D(s.toLowerCase(),"/user/keybindings.json"))&&i.type==="array"){for(var l=[],c=0,u=i.items;c<u.length;c++){var d=u[c];if(d.type==="object")for(var p=0,m=d.properties;p<m.length;p++){var g=m[p];if(g.keyNode.value==="key"&&g.valueNode){var b=xb.create(a.uri,Oh(a,d));if(l.push({name:jh(g.valueNode),kind:Bu.Function,location:b}),o--,o<=0)return r&&r.onResultLimitExceeded&&r.onResultLimitExceeded(s),l}}}return l}var y=function(k,z,C){return o>=0&&(z.type==="array"?z.items.forEach(function(w){return y(k,w,C)}):z.type==="object"&&z.properties.forEach(function(w){if(o>=0){var S=w.valueNode;if(S){o--;var O=xb.create(a.uri,Oh(a,w)),A=C?C+"."+w.keyNode.value:w.keyNode.value;k.push({name:n.getKeyLabel(w),kind:n.getSymbolKind(S.type),location:O,containerName:C}),y(k,S,A)}}})),k},v=y([],i,void 0);return o<0&&(v.pop(),r&&r.onResultLimitExceeded&&r.onResultLimitExceeded(s)),v},e.prototype.findDocumentSymbols2=function(a,t,r){var n=this;r===void 0&&(r={resultLimit:Number.MAX_VALUE});var i=t.root;if(!i)return null;var o=r.resultLimit,s=a.uri;if((s==="vscode://defaultsettings/keybindings.json"||$D(s.toLowerCase(),"/user/keybindings.json"))&&i.type==="array"){for(var l=[],c=0,u=i.items;c<u.length;c++){var d=u[c];if(d.type==="object")for(var p=0,m=d.properties;p<m.length;p++){var g=m[p];if(g.keyNode.value==="key"&&g.valueNode){var b=Oh(a,d),y=Oh(a,g.keyNode);if(l.push({name:jh(g.valueNode),kind:Bu.Function,range:b,selectionRange:y}),o--,o<=0)return r&&r.onResultLimitExceeded&&r.onResultLimitExceeded(s),l}}}return l}var v=function(z,C){return o>=0&&(C.type==="array"?C.items.forEach(function(w,S){if(w&&o>=0){o--;var O=Oh(a,w),A=O,B=String(S),L=v([],w);z.push({name:B,kind:n.getSymbolKind(w.type),range:O,selectionRange:A,children:L})}}):C.type==="object"&&C.properties.forEach(function(w){var S=w.valueNode;if(S&&o>=0){o--;var O=Oh(a,w),A=Oh(a,w.keyNode),B=v([],S);z.push({name:n.getKeyLabel(w),kind:n.getSymbolKind(S.type),range:O,selectionRange:A,children:B})}})),z},k=v([],i);return o<0&&(k.pop(),r&&r.onResultLimitExceeded&&r.onResultLimitExceeded(s)),k},e.prototype.getSymbolKind=function(a){switch(a){case"object":return Bu.Module;case"string":return Bu.String;case"number":return Bu.Number;case"array":return Bu.Array;case"boolean":return Bu.Boolean;default:return Bu.Variable}},e.prototype.getKeyLabel=function(a){var t=a.keyNode.value;return t&&(t=t.replace(/[\n]/g,"\u21B5")),t&&t.trim()?t:'"'+t+'"'},e.prototype.findDocumentColors=function(a,t,r){return this.schemaService.getSchemaForResource(a.uri,t).then(function(n){var i=[];if(n)for(var o=r&&typeof r.resultLimit=="number"?r.resultLimit:Number.MAX_VALUE,s=t.getMatchingSchemas(n.schema),l={},c=0,u=s;c<u.length;c++){var d=u[c];if(!d.inverted&&d.schema&&(d.schema.format==="color"||d.schema.format==="color-hex")&&d.node&&d.node.type==="string"){var p=String(d.node.offset);if(!l[p]){var m=rSt(jh(d.node));if(m){var g=Oh(a,d.node);i.push({color:m,range:g})}if(l[p]=!0,o--,o<=0)return r&&r.onResultLimitExceeded&&r.onResultLimitExceeded(a.uri),i}}}return i})},e.prototype.getColorPresentations=function(a,t,r,n){var i=[],o=Math.round(r.red*255),s=Math.round(r.green*255),l=Math.round(r.blue*255);function c(d){var p=d.toString(16);return p.length!==2?"0"+p:p}var u;return r.alpha===1?u="#"+c(o)+c(s)+c(l):u="#"+c(o)+c(s)+c(l)+c(Math.round(r.alpha*255)),i.push({label:u,textEdit:$d.replace(n,JSON.stringify(u))}),i},e})();function Oh(e,a){return lr.create(e.positionAt(a.offset),e.positionAt(a.offset+a.length))}var iSt={schemaAssociations:{},schemas:{}};function oSt(e,a){var t=[],r=[],n=[],i=-1,o=kb(e.getText(),!1),s=o.scan();function l(L){t.push(L),r.push(n.length)}for(;s!==17;){switch(s){case 1:case 3:{var c=e.positionAt(o.getTokenOffset()).line,u={startLine:c,endLine:c,kind:s===1?"object":"array"};n.push(u);break}case 2:case 4:{var d=s===2?"object":"array";if(n.length>0&&n[n.length-1].kind===d){var u=n.pop(),p=e.positionAt(o.getTokenOffset()).line;u&&p>u.startLine+1&&i!==u.startLine&&(u.endLine=p-1,l(u),i=u.startLine)}break}case 13:{var c=e.positionAt(o.getTokenOffset()).line,m=e.positionAt(o.getTokenOffset()+o.getTokenLength()).line;o.getTokenError()===1&&c+1<e.lineCount?o.setPosition(e.offsetAt(Ul.create(c+1,0))):c<m&&(l({startLine:c,endLine:m,kind:vx.Comment}),i=c);break}case 12:{var g=e.getText().substr(o.getTokenOffset(),o.getTokenLength()),b=g.match(/^\/\/\s*#(region\b)|(endregion\b)/);if(b){var p=e.positionAt(o.getTokenOffset()).line;if(b[1]){var u={startLine:p,endLine:p,kind:vx.Region};n.push(u)}else{for(var y=n.length-1;y>=0&&n[y].kind!==vx.Region;)y--;if(y>=0){var u=n[y];n.length=y,p>u.startLine&&i!==u.startLine&&(u.endLine=p,l(u),i=u.startLine)}}}break}}s=o.scan()}var v=a&&a.rangeLimit;if(typeof v!="number"||t.length<=v)return t;a&&a.onRangeLimitExceeded&&a.onRangeLimitExceeded(e.uri);for(var k=[],z=0,C=r;z<C.length;z++){var w=C[z];w<30&&(k[w]=(k[w]||0)+1)}for(var S=0,O=0,y=0;y<k.length;y++){var A=k[y];if(A){if(A+S>v){O=y;break}S+=A}}for(var B=[],y=0;y<t.length;y++){var w=r[y];typeof w=="number"&&(w<O||w===O&&S++<v)&&B.push(t[y])}return B}function sSt(e,a,t){function r(s){for(var l=e.offsetAt(s),c=t.getNodeFromOffset(l,!0),u=[];c;){switch(c.type){case"string":case"object":case"array":var d=c.offset+1,p=c.offset+c.length-1;d<p&&l>=d&&l<=p&&u.push(n(d,p)),u.push(n(c.offset,c.offset+c.length));break;case"number":case"boolean":case"null":case"property":u.push(n(c.offset,c.offset+c.length));break}if(c.type==="property"||c.parent&&c.parent.type==="array"){var m=o(c.offset+c.length,5);m!==-1&&u.push(n(c.offset,m))}c=c.parent}for(var g=void 0,b=u.length-1;b>=0;b--)g=EM.create(u[b],g);return g||(g=EM.create(lr.create(s,s))),g}function n(s,l){return lr.create(e.positionAt(s),e.positionAt(l))}var i=kb(e.getText(),!0);function o(s,l){i.setPosition(s);var c=i.scan();return c===l?i.getTokenOffset()+i.getTokenLength():-1}return a.map(r)}function fSe(e){var a=e.promiseConstructor||Promise,t=new Qzt(e.schemaRequestService,e.workspaceContext,a);t.setSchemaContributions(iSt);var r=new Rzt(t,e.contributions,a,e.clientCapabilities),n=new Nzt(t,e.contributions,a),i=new nSt(t),o=new Xzt(t,a);return{configure:function(s){t.clearExternalSchemas(),s.schemas&&s.schemas.forEach(function(l){t.registerExternalSchema(l.uri,l.fileMatch,l.schema)}),o.configure(s)},resetSchema:function(s){return t.onResourceChange(s)},doValidation:o.doValidation.bind(o),parseJSONDocument:function(s){return Tzt(s,{collectComments:!0})},newJSONDocument:function(s,l){return Mzt(s,l)},doComplete:r.doComplete.bind(r),findDocumentSymbols:i.findDocumentSymbols.bind(i),findDocumentSymbols2:i.findDocumentSymbols2.bind(i),findColorSymbols:function(s,l){return i.findDocumentColors(s,l).then(function(c){return c.map(function(u){return u.range})})},findDocumentColors:i.findDocumentColors.bind(i),getColorPresentations:i.getColorPresentations.bind(i),doHover:n.doHover.bind(n),getFoldingRanges:oSt,getSelectionRanges:sSt,format:function(s,l,c){var u=void 0;if(l){var d=s.offsetAt(l.start),p=s.offsetAt(l.end)-d;u={offset:d,length:p}}var m={tabSize:c?c.tabSize:4,insertSpaces:c?c.insertSpaces:!0,eol:`
|
|
11901
|
-
`};return yzt(s.getText(),u,m).map(function(g){return $d.replace(lr.create(s.positionAt(g.offset),s.positionAt(g.offset+g.length)),g.content)})}}}function mf(){const{tabsState:e}=Ft(),a=R.useCallback(({type:n,collectionId:i,workflowId:o,stepId:s,historyId:l})=>e.tabs.findIndex(c=>{const u=c.data.get();return fi(u,n)?(!i||u.collectionId===i)&&(!o||u.workflowId===o)&&(!s||u.stepId===s)&&(!l||u.historyId===l):!1}),[e]),t=R.useCallback(({type:n,collectionId:i,workflowId:o,stepId:s,historyId:l})=>{const c=a({type:n,collectionId:i,workflowId:o,stepId:s,historyId:l});return c!==-1?e.tabs[c]:void 0},[a,e]),r=R.useCallback((n,i)=>{if(!(!n.collectionId||!i.collectionId||n.collectionId!==i.collectionId)&&!(!n.workflowId||!i.workflowId)){if(n.workflowId!==i.workflowId){e.tabs.forEach(o=>{const s=o.data.get();s.collectionId===n.collectionId&&((fi(s,Ka.Workflow)||fi(s,Ka.WorkflowRun))&&s.workflowId===n.workflowId&&o.data.workflowId.set(i.workflowId),fi(s,Ka.Step)&&s.workflowId===n.workflowId&&o.data.workflowId.set(i.workflowId))});return}if(!(!n.stepId||!i.stepId)&&n.stepId!==i.stepId){e.tabs.forEach(o=>{const s=o.data.get();s.collectionId===n.collectionId&&fi(s,Ka.Step)&&s.workflowId===n.workflowId&&s.stepId===n.stepId&&o.data.stepId.set(i.stepId)});return}}},[e]);return{tabs:e.tabs,activeTabIdx:e.activeTabIdx,getExistingTabIndex:a,getExistingTab:t,handleIdChange:r}}function fi(e,a){return e.type===a}const NM=fSe({});let gSe=null;function vSe(e){gSe!==e&&(gSe=e,NM.configure({validate:!0,schemas:[{uri:"stub://test",fileMatch:["*"],schema:e}]}))}function bSe(e){const a=_M.create("stub.json","json",0,e),t=NM.parseJSONDocument(a);return{textDoc:a,jsonDoc:t}}const ySe=Ai.define({create(){},update(e){return e}}),kSe=e=>e.field(ySe,!1),lSt=({store:e,isResponse:a,apiOperation:t})=>{const r=_$(e).data.get();let n=t?.body?.mediaTypes?.[Lo.JSON]?.schema;if(fi(r,Ka.Step)&&a){const i=r.response?.status;i&&(n=t?.responses?.[i]?.mediaTypes?.[Lo.JSON]?.schema)}return[ySe.init(()=>({schema:Td(n||{}),store:e}))]};function cSt(){return async e=>{const{schema:a}=kSe(e.state)||{};if(!a)return[];vSe(a);const t=e.state.doc,{textDoc:r,jsonDoc:n}=bSe(t.toString());return(await NM.doValidation(r,n))?.map(i=>({from:HD(t,i.range.start),to:HD(t,i.range.end),message:i.message,severity:pSt[i.severity||3]}))}}const uSt=wu.highest(ob.of([{key:"Tab",run:e=>J0e(e)}]));function dSt(){return async function(e){const a={from:e.pos,to:e.pos,options:[],filter:!1},{schema:t}=kSe(e.state)||{};if(!t)return a;vSe(t);const r=e.state.doc,n=HD.bind(null,r),{textDoc:i,jsonDoc:o}=bSe(r.toString()),s=e.state.doc.lineAt(e.pos),l=s.number-1,c=e.pos-s.from,u=await NM.doComplete(i,{line:l,character:c},o);if(!u)return a;const d=e.state.sliceDoc(s.from,e.pos);if(d.trim().endsWith(",")||hSt(d))return a;a.options=u.items.map(g=>({label:g.label,info:g.documentation,apply:b=>{if(!g.textEdit||!("range"in g.textEdit))return;const y=g.textEdit.range,v=g.textEdit.newText.search(/(\$1|\${1:.*?})/);let k=g.textEdit.newText.replace(/(\$1|\${1:.*?})/,"");const z=v===-1?0:v-k.length;b.dispatch({changes:{from:n(y.start),to:n(y.end),insert:k}});const C=k.length-(y.end.character-y.start.character);b.dispatch({selection:oa.single(n(y.end)+C+z)})}}))||[];const p=e.state.wordAt(e.pos),m=p?.from?e.state.sliceDoc(p?.from,p?.to).toLowerCase():"";return m&&(a.options=a.options.filter(g=>g.label.toLowerCase().replace(/^"/,"").startsWith(m))),a}}const pSt={1:"error",2:"warning",3:"info",4:"hint"};function HD(e,a){return e.line(a.line+1).from+a.character}function hSt(e){try{return JSON.parse(`{${e}}`),!0}catch{return!1}}const xSe=ht.define();function jb(e){const a=e.activeEnvironmentId.get();return e.environments.find(t=>t.name.get()===a)?.get()||e.environments[0].get()}const FD=e=>zn.fromClass(class{decorations;constructor(a){this.decorations=this.buildDecorations(a,e)}update(a){(a.docChanged||a.viewportChanged)&&(this.decorations=this.buildDecorations(a.view,e))}buildDecorations(a,t){const r=jb(t.store)?.inputs,n=[],i=Na.mark({attributes:{style:"background-color: var(--bg-color-active);"}}),o=s=>Na.mark({attributes:{style:`color: var(--replay-${s?"undefined":"defined"}-variable-color); background-color: var(--replay-${s?"undefined":"defined"}-variable-bg-color);`}});for(const{from:s,to:l}of a.visibleRanges){const c=a.state.doc.sliceString(s,l),u=BA(c);for(const d of u){const p=s+d.start,m=s+d.end;if(!(p>=m))if(d.prefix==="inputs"){const g=gL(d.match),b=!r?.find(y=>y.name===g)?.value;n.push({from:p,to:m,value:o(b)})}else n.push({from:p,to:m,value:i})}}return Na.set(n,!0)}},{decorations:a=>a.decorations}),mSt=fSe({});function fSt(e){if(!e||typeof e!="object")return!1;const a=e;return typeof a.type=="string"&&typeof a.offset=="number"&&typeof a.length=="number"}function gSt(e){const a=[];if(!e)return a;const t=[e];for(;t.length>0;){const r=t.pop();if(r.type==="property"){r.valueNode&&t.push(r.valueNode);continue}if(r.type==="string"){const n=r.offset,i=r.offset+r.length;i>n&&a.push({from:n,to:i})}if(r.children&&r.children.length)for(const n of r.children)t.push(n)}return a}const vSt=e=>zn.fromClass(class{decorations;constructor(a){this.decorations=this.buildDecorations(a,e)}update(a){(a.docChanged||a.viewportChanged)&&(this.decorations=this.buildDecorations(a.view,e))}buildDecorations(a,t){const r=a.state.doc.toString();let n;try{const u=_M.create("inmemory://model.json","json",0,r),d=mSt.parseJSONDocument(u)?.root;n=fSt(d)?d:void 0}catch{n=void 0}const i=jb(t.store)?.inputs,o=Na.mark({attributes:{style:"background-color: var(--bg-color-active);"}}),s=u=>Na.mark({attributes:{style:`color: var(--replay-${u?"undefined":"defined"}-variable-color); background-color: var(--replay-${u?"undefined":"defined"}-variable-bg-color);`}}),l=[];if(!n)return Na.set([],!0);const c=gSt(n);for(const u of c){if(!a.visibleRanges.some(b=>Math.max(b.from,u.from)<Math.min(b.to,u.to))||!(r[u.from]==='"'&&r[u.to-1]==='"'))continue;const d=u.from+1,p=u.to-1;if(p<=d)continue;const m=a.state.doc.sliceString(d,p),g=BA(m);for(const b of g){const y=d+b.start,v=d+b.end;if(!(y>=v))if(b.prefix==="inputs"){const k=gL(b.match),z=!i?.find(C=>C.name===k)?.value;l.push({from:y,to:v,value:s(z)})}else l.push({from:y,to:v,value:o})}}return Na.set(l,!0)}},{decorations:a=>a.decorations}),Eu={[Lo.Text]:{name:"Text",extensions:[wa.lineWrapping],stateExtensions:[FD]},[Lo.JSON]:{name:"JSON",extensions:[xyt(),Q0t(cSt(),{delay:0,needsRefresh:e=>e.transactions.some(a=>a.effects.some(t=>t.is(xSe)))}),i0e.data.of({autocomplete:dSt()}),uSt],stateExtensions:[lSt,vSt]},[Lo.XML]:{name:"XML",extensions:[$0t()],stateExtensions:[FD]}},bSt={[Lo.Image]:{name:"Image",extensions:[],stateExtensions:[]}},ySt={[Lo.HTML]:{name:"HTML",extensions:[f0t()],stateExtensions:[FD]}},Ah={...Eu,...bSt,...ySt},wSe={[Lo.FormData]:{name:"form-data",extensions:void 0},[Lo["application/x-www-form-urlencoded"]]:{name:"x-www-form-urlencoded",extensions:void 0}},zSe={[Lo.Binary]:{name:"Binary",extensions:void 0}},ff={...Eu,...wSe,...zSe},kSt=Object.keys(Eu),GD=Object.keys(wSe),SSe=Object.keys(zSe);function CSe(e=[],a){const t={};return e.forEach(r=>{const n=String(r[a]);t[n]||(t[n]=[]),t[n].push(r)}),t}const kx={active:!0,key:"",value:""};function Ph(e,a){return[...e.map(t=>({id:crypto.randomUUID(),key:t.name,value:a.initializeWithInputs?`$inputs.${t.name}`:t.example?String(t.example):"",active:a.initializeWithInputs?!0:!!t.example,in:t.in})),Ln(a.in)]}function xx(e,a){const[t]=e.split("?"),r=a.slice(0,-1).filter(n=>n.active).map(n=>`${n.key}=${n.value}`).join("&");return`${t}${r?`?${r}`:""}`}function Wl(){return{id:crypto.randomUUID(),...kx}}function Ds(){return{id:crypto.randomUUID(),...kx,description:""}}function Ln(e){return{...kx,id:crypto.randomUUID(),in:e}}function gf(){return{id:crypto.randomUUID(),...kx,type:"text",files:null}}function qD(){return{id:crypto.randomUUID(),...kx,sendIn:Co.URL}}function JD(e){return e.map(a=>({id:crypto.randomUUID(),key:"",value:a,active:!0}))}function DM(e,a){return e.filter(t=>t.active&&t.value).map(({value:t})=>(a?Br(t,a):t).trim())}function Mh(e,a){const t=a.filter(r=>!!r).flatMap(r=>r).filter(r=>r.key&&r.active);return["path","header"].includes(e)?Array.from(new Map(t.map(r=>[r.key,r])).values()):t}function jSe(e,a){return e.map(({value:t,...r})=>({...r,value:Br(t,a)}))}function xSt(e,a){if(!e.startsWith("$components.parameters."))return null;const t=e.replace("$components.parameters.","");return t&&a[t]||null}function Rn(e=[],a={}){const t=[];for(const r of e)if(Up(r)){const n=xSt(r.reference,a);n&&t.push({...n,active:r.active,value:r.value||n.value})}else t.push(r);return t}function Th(e){return Object.entries(e).map(([a,t])=>({id:crypto.randomUUID(),key:"",value:a,active:!0,description:t}))}function wSt(e){return e.replace(/{/g,"{{").replace(/}/g,"}}")}const OSe={documentedOAuth2Types:[],grantType:We.ClientCredentials,authRequestExtraParams:[Wl()],tokenRequestExtraParams:[qD()],[We.ClientCredentials]:{clientId:"",clientSecret:"",clientAssertion:"",tokenUrl:"",scopes:[Ds()],accessToken:""},[We.ClientCredentialsWithJwtAssertion]:{clientId:"",clientSecret:"",clientAssertion:"",tokenUrl:"",scopes:[Ds()],accessToken:""},[We.AuthorizationCode]:{clientId:"",clientSecret:"",tokenUrl:"",authorizationUrl:"",callbackUrl:"",availableScopes:[],scopes:[Ds()],codeVerifier:"",codeChallenge:"",accessToken:""},[We.AuthorizationCodeWithPkce]:{clientId:"",clientSecret:"",tokenUrl:"",authorizationUrl:"",callbackUrl:"",availableScopes:[],scopes:[Ds()],codeVerifier:"",codeChallenge:"",accessToken:""},[We.Implicit]:{clientId:"",authorizationUrl:"",callbackUrl:"",availableScopes:[],scopes:[Ds()],accessToken:""},[We.Password]:{username:"",password:"",clientId:"",clientSecret:"",tokenUrl:"",accessToken:"",scopes:[Ds()]}},zSt={securityType:qe.NoAuth,securitySchemeId:null,[qe.BasicAuth]:{username:"",password:""},[qe.JWT]:{token:""},[qe.DigestAuth]:{username:"",password:"",nc:"00000001",realm:"",nonce:"",opaque:"",qop:"",algorithm:"",cnonce:""},[qe.APIKey]:{location:rl.Header,name:"",key:""},[qe.OAuth2]:OSe,[qe.OpenIDConnect]:{...OSe,openIdConnectUrl:"",userInfoUrl:""}},UD="urn:ietf:params:oauth:client-assertion-type:jwt-bearer",SSt={[Bo.SIMPLE]:{condition:"",type:Bo.SIMPLE},[Bo.REGEX]:{condition:"",type:Bo.REGEX,context:""},[Bo.JSONPATH]:{condition:"",type:Bo.JSONPATH,context:""},[Bo.XPATH]:{condition:"",type:Bo.XPATH,context:""}};function $M(){return structuredClone({type:Ji.Text,content:"",activeExampleName:"",formData:{"multipart/form-data":[gf()],"application/x-www-form-urlencoded":[gf()]},binary:null})}const CSt={method:"GET",url:"",security:[_u()],body:$M(),queryParameters:[Wl()],headers:[Wl()],cookies:[Wl()],pathParameters:[Wl()]};function ASe(){return structuredClone(CSt)}function _u(){return Td(zSt)}function jSt(e){return Td({id:crypto.randomUUID(),...SSt[e]})}function PSe(e,a,t){for(const r of t){const n=MSe(e,r),i=MSe(a,r);if(typeof n=="object"&&typeof i=="object"){if(!PSe(n,i,t))return!1}else if(n!==i)return!1}return!0}function MSe(e,a){const t=a.split("/");let r=e;for(const n of t)if(r&&typeof r=="object"&&n in r)r=r[n];else return;return r}function OSt(e,a){return e.length===a.length&&e.sort().join()===a.sort().join()}function ASt(e,a){return e.every(t=>a.includes(t))}function PSt(e){switch(e){case"query":return rl.Query;case"cookie":return rl.Cookie;case"header":return rl.Header;default:return}}function MSt(e,a,t){const{security:r}=a,n=Eut(e);if(!t)return!1;const i=WD(t),o=i.map(c=>c.securityType),s=r.map(c=>c.securityType);if(!OSt(o,s))return!0;let l=[];return r.forEach(c=>{const u=c.securityType,d=c[qe.OAuth2]?.grantType,p=o.includes(u),m=i.find(v=>v.securityType===u),g=!m||PSe(c,m,BSt(u,d)),b=TSt(c,u,c[qe.OAuth2]?.grantType,n),y=!!(p&&m&&g&&b);l.push(!t.security?.length||y)}),l.includes(!1)}function TSt(e,a,t,r){if(a===qe.OAuth2&&(t===We.AuthorizationCode||t===We.AuthorizationCodeWithPkce||t===We.Implicit)){const n=e[qe.OAuth2][t]?.availableScopes,i=DM(e[qe.OAuth2][t]?.scopes,r);return ASt(i,n)}return!0}function BSt(e,a){return e===qe.APIKey?[`${qe.APIKey}/name`,`${qe.APIKey}/location`]:e===qe.OAuth2?[`${qe.OAuth2}/grantType`,...ESt(a)]:e===qe.OpenIDConnect?[`${qe.OpenIDConnect}/openIdConnectUrl`]:[]}function ESt(e){return e===We.ClientCredentials?[`${qe.OAuth2}/${We.ClientCredentials}/tokenUrl`]:e===We.Password?[`${qe.OAuth2}/${We.Password}/tokenUrl`]:e===We.Implicit?[`${qe.OAuth2}/${We.Implicit}/authorizationUrl`]:e===We.AuthorizationCode?[`${qe.OAuth2}/${We.AuthorizationCode}/tokenUrl`,`${qe.OAuth2}/${We.AuthorizationCode}/authorizationUrl`]:e===We.AuthorizationCodeWithPkce?[`${qe.OAuth2}/${We.AuthorizationCodeWithPkce}/tokenUrl`,`${qe.OAuth2}/${We.AuthorizationCodeWithPkce}/authorizationUrl`]:[]}function _St(e){return e.map(a=>{const t=a.map(r=>r.id).join("_");return a.map(r=>({...r,schemeId:t}))})}function LSt(e){const a=e.security||[],t=a.map(r=>{let n="";const i=[];return r.forEach((o,s)=>{n=s===0?`${o.id}`:`${n}_${o.id}`,i.push(ZD(o))}),{id:n,security:i}});return a.length?t:[]}function RSt(e,a){const t=e.security||[];return t?.length?_Se(t).map((r,n)=>ZD(r)):[]}function WD(e){const a=(e.security||[])[0];return a?a.map(t=>ZD(t)):[_u()]}function ZD(e,a){const t={..._u(),securitySchemeId:e.id},r=IM(e);t.securityType=r;const n=e.id;if(e.id&&r!==qe.NoAuth&&(t[r].schemeName=e.id),r===qe.BasicAuth&&(t[qe.BasicAuth].username||(t[qe.BasicAuth].username=kn(n+tt.Username)),t[qe.BasicAuth].password||(t[qe.BasicAuth].password=kn(n+tt.Password))),r===qe.DigestAuth&&(t[qe.DigestAuth].username||(t[qe.DigestAuth].username=kn(n+tt.Username)),t[qe.DigestAuth].password||(t[qe.DigestAuth].password=kn(n+tt.Password))),r===qe.JWT&&!t[qe.JWT].token&&(t[qe.JWT].token=kn(n+tt.JWTToken)),r===qe.APIKey&&!t[qe.APIKey].key){t[qe.APIKey].name=e.name||"",t[qe.APIKey].key=kn(n+tt.APIKey);const i=PSt(e.in);i&&(t[qe.APIKey].location=i)}if(r===qe.OAuth2){const i=YD(e),o=kn(n+tt.Token),s=t[qe.OAuth2];s.grantType=i[0],i.forEach(l=>{l===We.AuthorizationCode&&!s[We.AuthorizationCode].accessToken&&(s[We.AuthorizationCode].accessToken=o,s[We.AuthorizationCode].clientId=kn(n+tt.ClientId),s[We.AuthorizationCode].authorizationUrl=e.flows?.authorizationCode?.authorizationUrl||"",s[We.AuthorizationCode].tokenUrl=e.flows?.authorizationCode?.tokenUrl||"",s[We.AuthorizationCode].clientSecret=kn(n+tt.ClientSecret),s[We.AuthorizationCode].availableScopes=Object.keys(e.flows?.authorizationCode?.scopes||{})||[],s[We.AuthorizationCode].scopes=[...Th(e.flows?.authorizationCode?.scopes||{})||[],Ds()]),l===We.AuthorizationCodeWithPkce&&!s[We.AuthorizationCodeWithPkce].accessToken&&(s[We.AuthorizationCodeWithPkce].accessToken=o,s[We.AuthorizationCodeWithPkce].clientId=kn(n+tt.ClientId),s[We.AuthorizationCodeWithPkce].authorizationUrl=e.flows?.authorizationCode?.authorizationUrl||"",s[We.AuthorizationCodeWithPkce].tokenUrl=e.flows?.authorizationCode?.tokenUrl||"",s[We.AuthorizationCodeWithPkce].clientSecret=kn(n+tt.ClientSecret),s[We.AuthorizationCodeWithPkce].availableScopes=Object.keys(e.flows?.authorizationCode?.scopes||{})||[],s[We.AuthorizationCodeWithPkce].scopes=[...Th(e.flows?.authorizationCode?.scopes||{}),Ds()]),l===We.ClientCredentials&&!s[We.ClientCredentials].accessToken&&(s[We.ClientCredentials].accessToken=o,s[We.ClientCredentials].clientId=kn(n+tt.ClientId),s[We.ClientCredentials].clientSecret=kn(n+tt.ClientSecret),s[We.ClientCredentials].tokenUrl=e.flows?.clientCredentials?.tokenUrl||"",s[We.ClientCredentials].scopes=[...Th(e.flows?.clientCredentials?.scopes||{}),Ds()]),l===We.ClientCredentialsWithJwtAssertion&&!s[We.ClientCredentialsWithJwtAssertion].accessToken&&(s[We.ClientCredentialsWithJwtAssertion].accessToken=o,s[We.ClientCredentialsWithJwtAssertion].clientId=kn(n+tt.ClientId),s[We.ClientCredentialsWithJwtAssertion].clientAssertion=kn(n+tt.ClientAssertion),s[We.ClientCredentialsWithJwtAssertion].scopes=[...Th(e.flows?.clientCredentials?.scopes||{}),Ds()]),l===We.Implicit&&!s[We.Implicit].accessToken&&(s[We.Implicit].accessToken=o,s[We.Implicit].clientId=kn(n+tt.ClientId),s[We.Implicit].authorizationUrl=e.flows?.implicit?.authorizationUrl||"",s[We.Implicit].availableScopes=Object.keys(e.flows?.implicit?.scopes||{})||[],s[We.Implicit].scopes=[...Th(e.flows?.implicit?.scopes||{}),Ds()]),l===We.Password&&!s[We.Password].accessToken&&(s[We.Password].accessToken=o,s[We.Password].clientId=kn(n+tt.ClientId),s[We.Password].clientSecret=kn(n+tt.ClientSecret),s[We.Password].tokenUrl=e.flows?.password?.tokenUrl||"",s[We.Password].scopes=[...Th(e.flows?.password?.scopes||{}),Ds()])})}if(r===qe.OpenIDConnect){const i=kn(n+tt.Token),o=t[qe.OpenIDConnect];o[We.AuthorizationCode].accessToken||(o[We.AuthorizationCode].accessToken=i,o[We.AuthorizationCode].clientId=kn(n+tt.ClientId),o[We.AuthorizationCode].clientSecret=kn(n+tt.ClientSecret),o[We.AuthorizationCode].tokenUrl=e.flows?.authorizationCode?.tokenUrl||""),o[We.AuthorizationCodeWithPkce].accessToken||(o[We.AuthorizationCodeWithPkce].accessToken=i,o[We.AuthorizationCodeWithPkce].clientId=kn(n+tt.ClientId),o[We.AuthorizationCodeWithPkce].clientSecret=kn(n+tt.ClientSecret),o[We.AuthorizationCodeWithPkce].tokenUrl=e.flows?.authorizationCode?.tokenUrl||""),o[We.Implicit].accessToken||(o[We.Implicit].accessToken=i,o[We.Implicit].clientId=kn(n+tt.ClientId))}return t}function NSt(e,a="",t){const r=CSe(e.parameters,"in"),n=TSe(e),i=WD(e),o=Ph(r.query||[],{in:"query"});return{id:crypto.randomUUID(),name:e.name,operationId:e.operationId,collectionPath:t,apiPath:{path:e.path,method:e.method},apiId:a,request:{pathParameters:Ph(r.path||[],{in:"path"}),method:e.method.toLocaleUpperCase(),url:xx(wSt(e.path),o),headers:Ph(r.header||[],{in:"header"}),queryParameters:o,cookies:Ph(r.cookie||[],{in:"cookie"}),body:n,security:i},response:null}}function QD(e){const a=CSe(e.parameters,"in"),t=TSe(e),r=WD(e);return{parameters:{queryParameters:Ph(a.query||[],{in:"query"}),headers:Ph(a.header||[],{in:"header"}),cookies:Ph(a.cookie||[],{in:"cookie"}),pathParameters:Ph(a.path||[],{initializeWithInputs:!0,in:"path"})},requestBody:t,security:r}}function TSe(e){const a=e.body?.mediaTypes;if(!a||!Object.keys(a).length)return $M();const t=DSt(a,e),r=t?.name||"",n=!GD.includes(r)&&!SSe.includes(r),i=XD(t),o=n&&i.length?JSON.stringify(i.find(({key:s})=>s===e.body?.activeExampleName)?.value,null,2)||JSON.stringify(i[0].value,null,2):"";return{...$M(),activeExampleName:e.body?.activeExampleName||i[0]?.key||"",...t&&{type:t.name},content:o,formData:{"multipart/form-data":ESe(a[Lo.FormData]),"application/x-www-form-urlencoded":ESe(a[Lo["application/x-www-form-urlencoded"]])}}}function BSe(e){return e?{...(Object.keys(e?.body?.mediaTypes||{})||[]).reduce((a,t)=>(a[t]={name:t,extensions:void 0},a),{}),...ff}:ff}function ESe(e){if(!e)return[gf()];if(!e.parameters)return[gf()];const a=e.parameters.map(t=>({id:crypto.randomUUID(),key:t.name,value:String(t.example)||"",active:!0,type:t.inputType,files:null}));return a.push(gf()),a}function XD(e){const a=e?.examples;return Object.keys(a||{}).map(t=>{const r=a?.[t];return{name:om(r?.summary)?r?.summary:r?.summary?.raw||t,key:t,value:a?.[t].value}})}function DSt(e,a){const t=BSe(a),r=Object.keys(e).find(n=>!!t[n]);return r?e[r]:null}function $St(e){return!e?.security?.length||!e?[]:RSt(e)}function _Se(e){const a=new Set;return e.flat().filter(t=>a.has(t.id)?!1:(a.add(t.id),!0))}function IM(e){if(e.type==="http"){if(e.scheme==="bearer")return qe.JWT;if(e.scheme==="basic")return qe.BasicAuth;if(e.scheme==="digest")return qe.DigestAuth}else{if(e.type==="apiKey")return qe.APIKey;if(e.type==="oauth2")return qe.OAuth2;if(e.type==="openIdConnect")return qe.OpenIDConnect}return qe.NoAuth}function ISt(e,a){if(e==="clientCredentials"&&a&&"x-assertionType"in a&&a["x-assertionType"]===UD)return We.ClientCredentialsWithJwtAssertion;if(e==="authorizationCode"&&a&&"x-usePkce"in a&&a["x-usePkce"])return We.AuthorizationCodeWithPkce;switch(e){case"implicit":return We.Implicit;case"password":return We.Password;case"clientCredentials":return We.ClientCredentials;case"authorizationCode":return We.AuthorizationCode;default:return We.AuthorizationCode}}function KSt(e,a){const t=e?.security;if(!t?.length)return[];const r=_St(t).flat().filter(n=>n.schemeId===a).find(n=>IM(n)===qe.OAuth2);return YD(r)}function YD(e){return Object.entries(e?.flows||{}).map(([a,t])=>ISt(a,t)).filter(Boolean)}async function wx(e){try{const a=await Hmt(e),t=await jbe(e);return{absolutePath:e,file:new File([a],t)}}catch(a){return console.error("Failed to init replay file",a),null}}async function LSe(e){return(await Promise.allSettled(e.map(a=>wx(a)))).map(a=>a.status==="fulfilled"?a.value:null).filter(a=>a!==null)}async function VSt(e,a,t,r,n,i){const o=await Promise.all(e.sourceDescriptions.map(async l=>({name:l.name,url:l.url,type:l.type,apiId:await HSt({projectPath:r,apiUrl:l.url,collectionId:a})}))),s={inputs:e.components?.inputs||{},parameters:Object.fromEntries(Object.entries(e.components?.parameters||{}).map(([l,c])=>[l,{...c,key:c.name,value:c.value,id:crypto.randomUUID(),active:!0}]))};return{...e,id:a,srcType:t,state:sr.Normal,sourceDescriptions:o,components:s,workflows:await Promise.all(e.workflows.map(async l=>({...l,state:sr.Normal,parameters:qSe(l.parameters,l["x-replay-disabled-parameters"],e.components?.parameters),outputs:FSe(l.outputs),security:KSe(l["x-security"]),steps:await Promise.all(l.steps.map(async c=>{const u=qSe(c.parameters,c["x-replay-disabled-parameters"],e.components?.parameters),d=c["x-operation"]??null;d&&(d.url=xx(d.url,u.queryParameters.filter(Jre)));const p=FSt(c,o,n);let m;if(p&&i){const b=n?.find(y=>y.id===p.apiId);m=i(p.path,p.method,b)}delete c.operationId,delete c["x-operation"];const g=await ZSt(c.requestBody,r);return{...c,state:sr.Normal,parameters:u,outputs:FSe(c.outputs),successCriteria:c.successCriteria?.map(b=>({...b,type:b.type??Bo.SIMPLE}))||[],requestBody:g,xOperation:d,security:KSe(c["x-security"],m),operation:p}}))})))}}async function HSt({projectPath:e,apiUrl:a,collectionId:t}){if(Ebe(a))return a;if(await nn.isAbsolute(a))return await nn.relative(e,a);const r=await nn.resolve(await nn.join(e,t,"..",a));return await nn.relative(e,r)}function FSt(e,a,t){if(e["x-operation"])return null;const{path:r,method:n,apiId:i}=NSe({operationPath:e.operationPath,parsedSourceDescriptions:a}),{operationId:o,apiId:s}=GSt({operationId:e.operationId,parsedSourceDescriptions:a}),l=s||i||a[0]?.apiId||"",c=t?.find(u=>u.id===l);if(o&&c&&!r&&!n){const u=XSt(o,c);return{apiId:l,path:u?.path??"",method:u?.method??"",operationId:o}}return{apiId:l,path:r??"",method:n??"",operationId:o}}function GSt({operationId:e,parsedSourceDescriptions:a}){if(!e)return{operationId:"",apiId:null};const t=e.split(".");if(t.length===1)return{operationId:e,apiId:a[0]?.apiId??""};const[,r,n=""]=t,i=a.find(({name:o})=>o===r);return{operationId:n,apiId:i?.apiId??""}}function RSe(e){return"reference"in e&&typeof e.reference=="string"}function NSe({operationPath:e,parsedSourceDescriptions:a}){if(!e)return{apiId:null,path:"",method:""};try{const t=e.split("#"),r=t.length>1?t[1]:t[0],n=t.length>1?t[0]:"";if(!r)return{path:"",method:"",apiId:null};let i=null,o=null;const s=/\$sourceDescriptions\.(.+)\.url/,l=n.match(s);if(l&&(i=l[1]),i){const d=a.find(({name:p})=>p===i);d&&(o=d.apiId)}const c=r.split("/"),u=c.pop()||"";return{path:Di.unescape(c.pop()||""),method:u.toLowerCase(),apiId:o}}catch{return{path:"",method:"",apiId:null}}}function qSt(e){switch(e.type){case"apiKey":return qe.APIKey;case"oauth2":return qe.OAuth2;case"openIdConnect":return qe.OpenIDConnect;case"http":return e.scheme==="basic"?qe.BasicAuth:e.scheme==="digest"?qe.DigestAuth:e.scheme==="bearer"?qe.JWT:qe.NoAuth;default:return qe.NoAuth}}function DSe(e,a){const t={clientCredentials:We.ClientCredentials,authorizationCode:We.AuthorizationCode,implicit:We.Implicit,password:We.Password,clientCredentialsWithJwtAssertion:We.ClientCredentialsWithJwtAssertion,authorizationCodeWithPkce:We.AuthorizationCodeWithPkce};return e==="clientCredentials"&&a["x-assertionType"]==="urn:ietf:params:oauth:client-assertion-type:jwt-bearer"?We.ClientCredentialsWithJwtAssertion:e==="authorizationCode"&&a["x-usePkce"]?We.AuthorizationCodeWithPkce:t[e]??null}function JSt(e){return{query:rl.Query,header:rl.Header,cookie:rl.Cookie}[e.toLowerCase()]||rl.Header}function USt(e){return{body:Co.Body,header:Co.Header,url:Co.URL}[e.toLowerCase()]||Co.URL}function $Se(e,a,t){return Object.keys(e).reduce((r,n)=>{const i=DSe(n,e[n]);if(!i)return r;switch(i){case We.ClientCredentials:r[i]={...t[i],clientId:a.clientId??"",clientSecret:a.clientSecret??"",clientAssertion:a.clientAssertion??"",tokenUrl:e[n].tokenUrl??"",scopes:vf(e[n].scopes,e[n]["x-replay-disabled-scopes"]),accessToken:a.accessToken??""};break;case We.AuthorizationCode:r[i]={...t[i],clientId:a.clientId??"",clientSecret:a.clientSecret??"",tokenUrl:e[n].tokenUrl??"",authorizationUrl:e[n].authorizationUrl??"",callbackUrl:a.callbackUrl??"",availableScopes:e[n].availableScopes??[],scopes:vf(e[n].scopes,e[n]["x-replay-disabled-scopes"]),accessToken:a.accessToken??""};break;case We.Implicit:r[i]={...t[i],clientId:a.clientId??"",authorizationUrl:e[n].authorizationUrl??"",callbackUrl:a.callbackUrl??"",availableScopes:vf(e[n].availableScopes),scopes:vf(e[n].scopes,e[n]["x-replay-disabled-scopes"]),accessToken:a.accessToken??""};break;case We.Password:r[i]={...t[i],tokenUrl:e[n].tokenUrl??"",username:a.username??"",password:a.password??"",clientId:a.clientId??"",clientSecret:a.clientSecret??"",accessToken:a.accessToken??""};break;case We.ClientCredentialsWithJwtAssertion:r[i]={...t[i],clientAssertion:a.clientAssertion??"",tokenUrl:e[n].tokenUrl??"",scopes:vf(e[n].scopes,e[n]["x-replay-disabled-scopes"]),clientId:a.clientId??"",clientSecret:a.clientSecret??"",accessToken:a.accessToken??""};break;case We.AuthorizationCodeWithPkce:r[i]={...t[i],tokenUrl:e[n].tokenUrl??"",authorizationUrl:e[n].authorizationUrl??"",callbackUrl:a.callbackUrl??"",availableScopes:vf(e[n].availableScopes),scopes:vf(e[n].scopes,e[n]["x-replay-disabled-scopes"]),codeVerifier:a.codeVerifier??"",codeChallenge:a.codeChallenge??"",clientId:a.clientId??"",clientSecret:a.clientSecret??"",accessToken:a.accessToken??""};break}return r},t)}function ISe(e,a,t){const r={..._u(),securityType:e},n=Object.keys(a.flows||{})[0],i=DSe(n,a.flows?.[n])??We.ClientCredentials;switch(e){case qe.BasicAuth:return{...r,[qe.BasicAuth]:{username:t.username,password:t.password,schemeName:a.id}};case qe.JWT:return{...r,[qe.JWT]:{token:t.token,schemeName:a.id}};case qe.DigestAuth:return{...r,[qe.DigestAuth]:{...r[qe.DigestAuth],username:t.username,password:t.password,schemeName:a.id}};case qe.APIKey:return{...r,[qe.APIKey]:{location:JSt(a.in),name:a.name,key:t.apiKey,schemeName:a.id}};case qe.OAuth2:return{...r,[qe.OAuth2]:{...r[qe.OAuth2],...$Se(a.flows||{},t||{},r[qe.OAuth2]),authRequestExtraParams:VSe(t.authRequestExtraParams),tokenRequestExtraParams:HSe(t.tokenRequestExtraParams),grantType:i,schemeName:a.id}};case qe.OpenIDConnect:return{...r,[qe.OpenIDConnect]:{...r[qe.OpenIDConnect],...$Se(t.flows||{},t||{},r[qe.OpenIDConnect]),openIdConnectUrl:t.openIdConnectUrl,userInfoUrl:t.userInfoUrl,authRequestExtraParams:VSe(t.authRequestExtraParams),tokenRequestExtraParams:HSe(t.tokenRequestExtraParams),grantType:i,schemeName:a.id}};default:return r}}function WSt(e,a){return[...e.map(t=>{if("scheme"in t){const n=qSt(t.scheme);return ISe(n,t.scheme,t.values)}const r=a.find(n=>n.id===t.schemeName);if(r){const n=IM(r),i=ISe(n,r,t.values);return i.securitySchemeId=r.id,i}return _u()})]}function KSe(e=[],a){const t=_Se(a?.security||[]);return e.length?WSt(e,t):[_u()]}function vf(e,a){const t=Th(e||{}),r=Th(a||{});return[...t,...r,Ds()]}function VSe(e){return(e||[]).map(a=>({id:crypto.randomUUID(),key:a.key??"",value:a.value??"",active:a.active??!0})).concat(Wl())}function HSe(e){return(e||[]).map(a=>({id:crypto.randomUUID(),key:a.key??"",value:a.value??"",active:a.active??!0,sendIn:USt(a.in)})).concat(qD())}function FSe(e){if(!e)return[Wl()];const a=[];for(const t in e)a.push({id:crypto.randomUUID(),key:t,value:e[t],active:!0});return a.push(Wl()),a}const KM={query:"queryParameters",path:"pathParameters",header:"headers",cookie:"cookies"};function GSe(e,a){const t="$components.parameters.";if(e.reference.startsWith(t)){const r=e.reference.replace(t,"");return a?.[r]}}function qSe(e,a,t){if(!e&&!a)return{pathParameters:[Ln("path")],queryParameters:[Ln("query")],headers:[Ln("header")],cookies:[Ln("cookie")]};const r={pathParameters:[],queryParameters:[],headers:[],cookies:[]};if(e)for(const n of e)if(RSe(n)){const i=GSe(n,t),o=KM[i?.in];o&&r[o].push({reference:n.reference,active:!0,value:n.value})}else r[KM[n.in]].push({id:crypto.randomUUID(),key:n.name,value:n.value,active:!0,in:n.in});if(a)for(const n of a)if(RSe(n)){const i=GSe(n,t),o=KM[i?.in];o&&r[o].push({reference:n.reference,active:!1,value:n.value})}else r[KM[n.in]].push({id:crypto.randomUUID(),key:n.name,value:n.value,active:!1,in:n.in});return r.pathParameters.push(Ln("path")),r.queryParameters.push(Ln("query")),r.headers.push(Ln("header")),r.cookies.push(Ln("cookie")),r}async function ZSt(e,a){const t=ASe().body;if(!e)return t;switch(e.contentType){case"application/x-www-form-urlencoded":case"multipart/form-data":return{...t,type:e.contentType,formData:await QSt(e,a)};case"application/octet-stream":const r=e.payload?await WSe(e.payload,a):[],n=r.length>0?await wx(r[0]):null;return{...t,type:e.contentType,binary:n};case"application/json":case"application/ld+json":return{...t,type:e.contentType,content:USe(e.payload)};default:{const i=typeof e.payload=="string",o=e.contentType||(i?"text/plain":"application/json");return{...t,type:o,content:i?e.payload:USe(e.payload)}}}}async function JSe(e,a,t,r){const n=await WSe(a,r),i=n.length>0||Array.isArray(a),o=i?await LSe(n):void 0;return{id:crypto.randomUUID(),key:e,value:i?"":a,type:i?"file":"text",active:t,files:o}}async function QSt(e,a){const t=ASe().body.formData,r=e.contentType,n=e.payload?await Promise.all(Object.entries(e.payload).map(([o,s])=>JSe(o,s,!0,a))):[],i=e["x-replay-disabled-payload"]?await Promise.all(Object.entries(e["x-replay-disabled-payload"]||{}).map(([o,s])=>JSe(o,s,!1,a))):[];return{...t,[r]:[...n,...i,gf()]}}function USe(e){return e?JSON.stringify(e,null,2):""}function XSt(e,a){for(const t of Object.keys(a.paths)){const r=a.paths[t];for(const n of Object.keys(r)){const i=n.toLowerCase();if(["get","put","post","delete","options","head","patch","trace"].includes(i)&&r[i]?.operationId===e)return{method:i,path:t}}}return null}async function WSe(e,a){return Array.isArray(e)?(await Promise.all(e.map(t=>ZSe(t,a)))).flat():typeof e=="string"?await ZSe(e,a):[]}async function ZSe(e,a){const t=/\$file\(['"](.+?)['"]\)/g,r=Array.from(e.matchAll(t));return Promise.all(r.map(n=>YSt(n[1],a)))}async function YSt(e,a){return await nn.isAbsolute(e)?e:await nn.resolve(await nn.join(a,e))}const hs=e=>!e||typeof e=="boolean"?{type:"object",properties:{}}:e.type?e:{...e,type:"object"},QSe=(e,a,t)=>{if(!e.properties)return e;const r=e.properties[a],n=hs(r);return{...e,properties:{...e.properties,[a]:{...n,...t}}}},e2t=(e,a,t)=>{if(!e.properties||a===t||!t.trim())return null;const r={...e.properties};return r[t]?null:(r[t]=r[a],delete r[a],{...e,properties:r})},a2t=(e,a)=>{if(!e.properties)return e;const t={...e.properties};return delete t[a],{...e,properties:t}},t2t=(e,a,t={type:"string"})=>{const r=e.properties||{};return{...e,type:"object",properties:{...r,[a]:t}}};function XSe(e){const a=Object.assign({},...(e||[]).filter(({key:t,active:r})=>t&&r).map(t=>({[t.key]:t.value})));if(Object.keys(a).length!==0)return a}function YSe(e){if(!e)return{};const a={queryParameters:"query",headers:"header",cookies:"cookie",pathParameters:"path"},t=[],r=[];return Object.keys(a).forEach(n=>{const i=n;e[i].forEach(o=>{if(Up(o)){const s={reference:o.reference,value:o.value||void 0};o.active?t.push(s):r.push(s)}else{if(!o.key)return;const s={name:o.key,in:a[i],value:o.value};o.active?t.push(s):r.push(s)}})}),{parameters:t.length>0?t:void 0,"x-replay-disabled-parameters":r.length>0?r:void 0}}function r2t(e){const a=e?.map(t=>({condition:t.condition,context:t.context,type:t.type==Bo.SIMPLE?void 0:t.type}));if(a?.length!==0)return a}function n2t(e){if(!(!e||e.length===0))return[...e]}async function e2e(e,a){return e.absolutePath?`$file('${await nn.relative(a,e.absolutePath)}')`:null}async function i2t(e,a){const{type:t,value:r,files:n}=e;switch(t){case"text":return r;case"file":let i=[];return n&&(i=(await Promise.all(Object.values(n).map(o=>e2e(o,a)))).filter(o=>o!==null)),i.length===0?"":i.length===1?i[0]:i}}async function o2t(e,a){const t=e.type,r=e.formData[t],n={},i={};return await Promise.all(r.map(async o=>{const{key:s,active:l}=o;if(!s)return;const c=await i2t(o,a);l?n[s]=c:i[s]=c})),{payload:Object.keys(n).length>0?n:void 0,"x-replay-disabled-payload":Object.keys(i).length>0?i:void 0}}function s2t(e){if(!e)return e;try{const a=JSON.parse(e);return typeof a=="object"?a:e}catch{return e}}async function l2t(e,a){if(e)switch(e.type){case"application/x-www-form-urlencoded":case"multipart/form-data":return{contentType:e.type,...await o2t(e,a)};case"application/octet-stream":return{contentType:e.type,payload:e.binary?await e2e(e.binary,a):null};case"application/json":case"application/ld+json":return e.content?{contentType:e.type,payload:s2t(e.content)}:void 0;default:return e.content?{contentType:e.type,payload:e.content}:void 0}}function c2t(e){return{...e.schemeName?{schemeName:e.schemeName}:{scheme:{type:"http",scheme:"basic"}},values:{username:e.username,password:e.password}}}function u2t(e){return{...e.schemeName?{schemeName:e.schemeName}:{scheme:{type:"apiKey",name:e.name,in:e.location.toLowerCase()}},values:{apiKey:e.key}}}function d2t(e){return{...e.schemeName?{schemeName:e.schemeName}:{scheme:{type:"http",scheme:"bearer"}},values:{token:e.token}}}function p2t(e){return{...e.schemeName?{schemeName:e.schemeName}:{scheme:{type:"http",scheme:"digest"}},values:{username:e.username,password:e.password}}}function h2t(e){const{flows:a,values:t}=r2e(e);return{...e.schemeName?{schemeName:e.schemeName}:{scheme:{type:"openIdConnect",flows:a}},values:{...t,openIdConnectUrl:e.openIdConnectUrl,userInfoUrl:e.userInfoUrl,authRequestExtraParams:a2e(e.authRequestExtraParams),tokenRequestExtraParams:t2e(e.tokenRequestExtraParams)}}}function m2t(e){const{flows:a,values:t}=r2e(e);return{...e.schemeName?{schemeName:e.schemeName}:{scheme:{type:"oauth2",flows:a}},values:{...t,authRequestExtraParams:a2e(e.authRequestExtraParams),tokenRequestExtraParams:t2e(e.tokenRequestExtraParams)}}}function Ob(e){const a={},t={};return e.forEach(r=>{r.value&&(r.active?a[r.value]=r.description:t[r.value]=r.description)}),{scopes:a,"x-replay-disabled-scopes":Object.keys(t).length>0?t:void 0}}function a2e(e){return e.filter(a=>a.value||a.key).map(a=>({key:a.key,value:a.value,active:a.active}))}function t2e(e){return e.filter(a=>a.value||a.key).map(a=>({key:a.key,value:a.value,active:a.active,in:a.sendIn.toLowerCase()}))}function r2e(e){let a;switch(e.grantType){case We.ClientCredentials:return a=e[We.ClientCredentials],{flows:{clientCredentials:{tokenUrl:a.tokenUrl,...Ob(a.scopes)}},values:{clientId:a.clientId,clientSecret:a.clientSecret,accessToken:a.accessToken}};case We.Implicit:return a=e[We.Implicit],{flows:{implicit:{authorizationUrl:a.authorizationUrl,...Ob(a.scopes)}},values:{clientId:a.clientId,accessToken:a.accessToken,callbackUrl:a.callbackUrl}};case We.Password:return a=e[We.Password],{flows:{password:{tokenUrl:a.tokenUrl,...Ob(a.scopes)}},values:{clientId:a.clientId,clientSecret:a.clientSecret,username:a.username,password:a.password,accessToken:a.accessToken}};case We.AuthorizationCode:return a=e[We.AuthorizationCode],{flows:{authorizationCode:{tokenUrl:a.tokenUrl,authorizationUrl:a.authorizationUrl,...Ob(a.scopes)}},values:{accessToken:a.accessToken,clientId:a.clientId,callbackUrl:a.callbackUrl}};case We.ClientCredentialsWithJwtAssertion:return a=e[We.ClientCredentialsWithJwtAssertion],{flows:{clientCredentials:{tokenUrl:a.tokenUrl,...Ob(a.scopes),"x-assertionType":"urn:ietf:params:oauth:client-assertion-type:jwt-bearer"}},values:{clientId:a.clientId,clientAssertion:a.clientAssertion,accessToken:a.accessToken}};case We.AuthorizationCodeWithPkce:return a=e[We.AuthorizationCodeWithPkce],{flows:{authorizationCode:{tokenUrl:a.tokenUrl,authorizationUrl:a.authorizationUrl,...Ob(a.scopes),"x-usePkce":!0}},values:{clientId:a.clientId,clientSecret:a.clientSecret,accessToken:a.accessToken,codeVerifier:a.codeVerifier,codeChallenge:a.codeChallenge,callbackUrl:a.callbackUrl}}}}function n2e(e){const a=e.map(t=>{switch(t.securityType){case qe.OpenIDConnect:{const r=t[qe.OpenIDConnect];return h2t(r)}case qe.OAuth2:{const r=t[qe.OAuth2];return m2t(r)}case qe.APIKey:{const r=t[qe.APIKey];return u2t(r)}case qe.BasicAuth:{const r=t[qe.BasicAuth];return c2t(r)}case qe.DigestAuth:{const r=t[qe.DigestAuth];return p2t(r)}case qe.JWT:{const r=t[qe.JWT];return d2t(r)}default:return null}}).filter(t=>t!==null);return{"x-security":a.length?a:void 0}}function f2t(e){const{inputs:a,parameters:t,...r}=e;let n=r;return Object.keys(a).length&&(n.inputs=a),Object.keys(t).length&&(n.parameters=Object.fromEntries(Object.entries(t).map(([i,{id:o,active:s,key:l,...c}])=>[i,{...c,name:l}]))),Object.keys(n).length||(n=void 0),n}async function g2t(e,a){const{id:t,state:r,srcType:n,sourceDescriptions:i,workflows:o,components:s,...l}=e;return{arazzoObject:{...l,sourceDescriptions:i.map(c=>({name:c.name,url:c.url,type:c.type||"openapi"})),components:f2t(s),workflows:await Promise.all(o.map(async({parameters:c,security:u,dependsOn:d,outputs:p,state:m,steps:g,inputs:b,...y})=>({...y,dependsOn:n2t(d),outputs:XSe(p),inputs:b?hs(b):void 0,...n2e(u),...YSe(c),steps:await Promise.all(g.map(async({parameters:v,security:k,operation:z,requestBody:C,successCriteria:w,outputs:S,state:O,xOperation:A,...B})=>{const L={operationId:void 0,operationPath:void 0,"x-operation":void 0};if(z){const q=e.sourceDescriptions.find(({apiId:N})=>N===z.apiId)||e.sourceDescriptions[0];if(z.operationId){const N=e.sourceDescriptions.length<=1;L.operationId=N?z.operationId:`$sourceDescriptions.${q.name}.${z.operationId}`}else L.operationPath=`{$sourceDescriptions.${q.name}.url}#/paths/${Di.escape(z.path)}/${z.method}`}else A&&(L["x-operation"]={...A,url:A.url.split("?")[0]});return{...B,...L,...n2e(k),...YSe(v),requestBody:await l2t(C,a),successCriteria:r2t(w),outputs:XSe(S)}}))})))}}}class v2t extends Rbe{constructor(a,t){super(a),this.convertOperationToReplayValue=t}parse(a,t){return VSt(a.content,a.uri,a.type,this.storage.baseDir,t,this.convertOperationToReplayValue)}async stringify(a){const{arazzoObject:t}=await g2t(a,this.storage.baseDir);return await nn.extname(a.id)===".json"?JSON.stringify(t,null,2):Jp.dump(t)}}class b2t{constructor(a,t){this.storage=a,this.localStorageSecretsProvider=t}default=[];async read(){const a=await this.storage.get("replay-environments.yaml"),t=await this.localStorageSecretsProvider.get();let r=null,n=null;if(!a)return this.default;try{r=Jp.load(a),n=t?JSON.parse(t):null}catch(i){return console.error("Failed to parse environments file",i),this.default}return r?Object.keys(r).filter(i=>i!=="version").map(i=>({name:i,inputs:Object.entries(r[i].inputs).map(([o,s])=>{if(typeof s=="string")return{name:o,value:s,isSecret:!1};const l=n?.[i]?.[o]??"";return{name:o,value:l,isSecret:!0}}),servers:Object.entries(r[i].servers).map(([o,s])=>({apiId:o,value:s.value,variables:Object.entries(s.variables||{}).map(([l,c])=>({name:l,value:c}))})),state:sr.Normal})):this.default}async write(a){const t=await this.localStorageSecretsProvider.get(),r=t?JSON.parse(t):{},n=a.reduce((i,o)=>(o.name&&(i[o.name]={inputs:o.inputs.reduce((s,l)=>(l.isSecret&&r?(r[o.name]||(r[o.name]={}),r[o.name][l.name]=l.value,s[l.name]={provider:"local"}):s[l.name]=l.value,s),{}),servers:o.servers.reduce((s,l)=>(s[l.apiId]={value:l.value,variables:Object.fromEntries(l.variables.map(c=>[c.name,c.value]))},s),{})}),i),{});this.localStorageSecretsProvider.set(JSON.stringify(r)),n&&this.storage.set("replay-environments.yaml",Jp.dump(n))}}class y2t{constructor(a,t,r){this.storage=a,this.filePath=t,this.defaultValue=r}async parse(a){return JSON.parse(a)}stringify(a){return JSON.stringify(a)}async read(){const a=await this.storage.get(this.filePath);return a?await this.parse(a):this.defaultValue}async write(a){return this.storage.set(this.filePath,this.stringify(a))}}const k2t=(e,a)=>({data:e,version:a});class e$ extends y2t{constructor(a,t,r,n){super(a,t,r),this.version=n}migrationMap={};migrate(a){if(!this.migrationMap[a.version])return this.defaultValue;const t=this.migrationMap[a.version](a);return t.version===this.version?t:this.migrate(t)}async parse(a){const t=JSON.parse(a);if(t.version!==this.version){const r=this.migrate(t);return await this.write(r.data),r.data}return t.data}stringify(a){return JSON.stringify(k2t(a,this.version))}}function x2t(e){return{data:{...e.data,tabs:e.data.tabs.map(a=>a.data.type===Ka.Step?{...a,data:{...a.data,draftStep:{...a.data.step,security:a.data.step.security.securities},step:void 0,hasUnsavedChanges:void 0,showUnsavedChangesModal:void 0}}:a)},version:2}}const i2e=2,w2t="tabs.json";class z2t extends e${migrationMap={1:x2t};constructor(a){super(a,w2t,Td(zbe),i2e)}async parse(a){let t=JSON.parse(a);t.version!==i2e&&(t=this.migrate(t));const r=await Promise.all(t.data.tabs.map(async n=>{if(n.data.type===Ka.Step&&n.data.draftStep){const i=n.data.draftStep.requestBody.formData;i["multipart/form-data"]=await o2e(i["multipart/form-data"]),i["application/x-www-form-urlencoded"]=await o2e(i["application/x-www-form-urlencoded"]),n.data.draftStep.requestBody.binary&&n.data.draftStep.requestBody.binary.absolutePath&&(n.data.draftStep.requestBody.binary=await wx(n.data.draftStep.requestBody.binary.absolutePath))}return n}));return{...t.data,tabs:r}}stringify(a){return super.stringify({...a,tabs:a.tabs.map(t=>t.data.type===Ka.Step?{...t,data:{...t.data,response:null}}:t.data.type===Ka.WorkflowRun?{...t,data:{...t.data,result:null}}:t)})}}async function o2e(e){return Promise.all(e.map(async a=>{const t={...a};if(a.files){const r=a.files.map(n=>n.absolutePath).filter(n=>n!==null);t.files=await LSe(r)}return t}))}const S2t=1,C2t=1;class j2t{constructor(a,t){this.project=a,this.convertOperationToReplayValue=t,this.localStorageSecretsProvider=new Xmt(this.project.id),this.systemFilesStorage=this.isTauriApp?new Lbe(this.project.systemFilesDir):new _be(this.project.systemFilesDir),this.userFilesStorage=this.isTauriApp?new Lbe(this.project.userFilesDir):new _be(this.project.userFilesDir);const r=new Zmt;this.historyStorage=new e$(this.systemFilesStorage,"history.json",[],S2t),this.activeEnvironmentIdStorage=new e$(this.systemFilesStorage,"active_environment_id.json",A0,C2t),this.tabsStateStorage=new z2t(this.systemFilesStorage),this.environmentsStorage=new b2t(this.userFilesStorage,this.localStorageSecretsProvider),this.collectionsStorage=new v2t(this.userFilesStorage,this.convertOperationToReplayValue),this.apisStorage=new Ymt(this.isTauriApp?this.userFilesStorage:r)}historyStorage;activeEnvironmentIdStorage;tabsStateStorage;environmentsStorage;collectionsStorage;apisStorage;isTauriApp=Wv();systemFilesStorage;localStorageSecretsProvider;userFilesStorage;async detectProjectFiles(){const a=(await this.userFilesStorage.ls()).filter(i=>/\.(ya?ml|json)$/.test(i)),t=[],r=[],n=new Set;return await Promise.all(a.map(async i=>{const o=await this.userFilesStorage.get(i);if(o)try{const s=Jp.load(o);if(typeof s=="object"&&s!==null)if(typeof s.openapi=="string"){const l=await nn.resolve(await nn.join(this.userFilesStorage.baseDir,i)),c=await Bbe(l,s);t.push({uri:i,type:vu.FS,content:c})}else typeof s.arazzo=="string"&&(r.push({uri:i,type:vu.FS,content:s}),s.sourceDescriptions?.map(async l=>{const c=l.type,u=l.url,d=!c||c==="openapi",p=typeof u=="string"&&Ebe(u);d&&p&&n.add(u)}))}catch(s){console.error(`Error parsing YAML/JSON file ${i}:`,s)}})),{apiFiles:t,collectionFiles:r,apiUrls:n}}async loadApis(a){const t=[];return await Promise.all(Array.from(a).map(async r=>{try{const n=await Bbe(r);t.push({uri:r,type:vu.WEB,content:n})}catch(n){console.error(`Error parsing YAML from ${r}:`,n)}})),t}async read(){const[a,t,r,n]=await Promise.all([this.historyStorage.read(),this.activeEnvironmentIdStorage.read(),this.tabsStateStorage.read(),this.environmentsStorage.read()]),{apiFiles:i,collectionFiles:o,apiUrls:s}=await this.detectProjectFiles(),l=await this.loadApis(s),c=await this.apisStorage.parseMany([...i,...l]),u=await this.collectionsStorage.parseMany(o,c);return{project:this.project,history:a,activeEnvironmentId:t,tabsState:r,environments:n,apis:c,collections:u}}async update(a,t){switch(a.path[0]){case"history":this.historyStorage.write(t.history.get());break;case"activeEnvironmentId":this.activeEnvironmentIdStorage.write(t.activeEnvironmentId.get());break;case"tabsState":this.tabsStateStorage.write(t.tabsState.get());break;case"environments":this.environmentsStorage.write(t.environments.get());break;case"apis":this.isTauriApp&&await this.apisStorage.update(a,t.apis.get());break;case"collections":await this.collectionsStorage.update(a,t.collections.get());break}}}function O2t(e=!1){let a,t=!1;return()=>({id:"RootStoragePlugin",onCreate:()=>({init:r=>async(n,i)=>{if(t||r.path.length>0)return{isInitialized:!1};if(t=!0,!e){a=new j2t(n,i);const o=await a.read();r.merge(o)}return t=!1,{isInitialized:!0}}}),onSet(r,n,i){t||e||a.update(n,i)}})}function A2t({defaultEnvironments:e}={}){return structuredClone({project:{id:"default",userFilesDir:"default",systemFilesDir:"default"},history:[],tabsState:Td(zbe),activeEnvironmentId:A0,environments:e||wbe,collections:[],apis:[],requestController:null,apps:{apps:[],appsLoadingState:gu.Idle},predefinedApiId:null,predefinedEnvironmentNames:new Set,predefinedInputNames:new Set})}const P2t=Wia(A2t(),Zia(Dmt({key:"replay-root-store"}),O2t())),s2e=R.createContext(P2t);function Ft(){const e=R.useContext(s2e);return Gre(e)}function M2t(){return{theme:"light",disableCollectionsTab:!1,oAuth2RedirectURI:null,corsProxyUrl:void 0,mockServer:void 0,certificates:[],isApiBased:!1,generatedEnvironments:[],generatedInputs:[]}}const T2t=M2t(),B2t=R.createContext(T2t);function Id(){const e=R.useContext(B2t);return Gre(e)}function E2t(e,a){const{apps:{apiId:t}}=Ft(),{corsProxyUrl:r,disableCollectionsTab:n,mockServer:i,oAuth2RedirectURI:o,certificates:s,storageKey:l,isApiBased:c}=Id();r.set(e?.corsProxyUrl??_mt),i.set(e?.mockServer),t.set(e?.apiId),o.set(e?.oAuth2RedirectURI),n.set(!!e?.disableCollectionsTab),l.set(e?.storageKey),c.set(!!a),R.useEffect(()=>{s.set(e?.certificates||[])},[e?.certificates])}const l2e=R.createContext({});function zx(){return R.useContext(l2e)||{}}const _2t="0.19.0-next.0",L2t={version:_2t};class R2t{client;_isInitialized=!1;constructor(){this.client=new Bmt}get isInitialized(){return this._isInitialized}init(a){if(this.isInitialized)return;const t=!0,r=a?.tracerName||"desktop",n=a?.enableErrorInstrumentation??r==="desktop",i={serviceName:"replay",serviceVersion:L2t.version,version:"1.0.0",tracerName:r,collectorUrl:a?.collectorUrl||"",isProd:t,enableErrorInstrumentation:n};this.client.init({otel:{...a,...i}}),this._isInitialized=!0}sendEvent(a,t){if(!this.isInitialized){console.warn("Telemetry client not initialized. Call init() first.");return}try{this.client.send(a,t)}catch(r){console.error("Failed to send telemetry event:",r)}}}const a$=new R2t;function Bt(){const{telemetry:e}=zx();return a$.isInitialized||a$.init({tracerName:e?.tracerName,collectorUrl:e?.collectorUrl,enableErrorInstrumentation:e?.enableErrorInstrumentation}),{sendEvent:(a,t)=>{a$.sendEvent(a,t)}}}const Ro=800;function bf(e){"@babel/helpers - typeof";return bf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(a){return typeof a}:function(a){return a&&typeof Symbol=="function"&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},bf(e)}function N2t(e,a){if(bf(e)!="object"||!e)return e;var t=e[Symbol.toPrimitive];if(t!==void 0){var r=t.call(e,a);if(bf(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(a==="string"?String:Number)(e)}function c2e(e){var a=N2t(e,"string");return bf(a)=="symbol"?a:a+""}function Sx(e,a,t){return(a=c2e(a))in e?Object.defineProperty(e,a,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[a]=t,e}function u2e(e,a){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);a&&(r=r.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,r)}return t}function Ya(e){for(var a=1;a<arguments.length;a++){var t=arguments[a]!=null?arguments[a]:{};a%2?u2e(Object(t),!0).forEach(function(r){Sx(e,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):u2e(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))})}return e}function D2t(e){if(Array.isArray(e))return e}function $2t(e,a){var t=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(t!=null){var r,n,i,o,s=[],l=!0,c=!1;try{if(i=(t=t.call(e)).next,a===0){if(Object(t)!==t)return;l=!1}else for(;!(l=(r=i.call(t)).done)&&(s.push(r.value),s.length!==a);l=!0);}catch(u){c=!0,n=u}finally{try{if(!l&&t.return!=null&&(o=t.return(),Object(o)!==o))return}finally{if(c)throw n}}return s}}function t$(e,a){(a==null||a>e.length)&&(a=e.length);for(var t=0,r=Array(a);t<a;t++)r[t]=e[t];return r}function d2e(e,a){if(e){if(typeof e=="string")return t$(e,a);var t={}.toString.call(e).slice(8,-1);return t==="Object"&&e.constructor&&(t=e.constructor.name),t==="Map"||t==="Set"?Array.from(e):t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?t$(e,a):void 0}}function I2t(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
11901
|
+
`};return yzt(s.getText(),u,m).map(function(g){return $d.replace(lr.create(s.positionAt(g.offset),s.positionAt(g.offset+g.length)),g.content)})}}}function mf(){const{tabsState:e}=Ft(),a=R.useCallback(({type:n,collectionId:i,workflowId:o,stepId:s,historyId:l})=>e.tabs.findIndex(c=>{const u=c.data.get();return fi(u,n)?(!i||u.collectionId===i)&&(!o||u.workflowId===o)&&(!s||u.stepId===s)&&(!l||u.historyId===l):!1}),[e]),t=R.useCallback(({type:n,collectionId:i,workflowId:o,stepId:s,historyId:l})=>{const c=a({type:n,collectionId:i,workflowId:o,stepId:s,historyId:l});return c!==-1?e.tabs[c]:void 0},[a,e]),r=R.useCallback((n,i)=>{if(!(!n.collectionId||!i.collectionId||n.collectionId!==i.collectionId)&&!(!n.workflowId||!i.workflowId)){if(n.workflowId!==i.workflowId){e.tabs.forEach(o=>{const s=o.data.get();s.collectionId===n.collectionId&&((fi(s,Ka.Workflow)||fi(s,Ka.WorkflowRun))&&s.workflowId===n.workflowId&&o.data.workflowId.set(i.workflowId),fi(s,Ka.Step)&&s.workflowId===n.workflowId&&o.data.workflowId.set(i.workflowId))});return}if(!(!n.stepId||!i.stepId)&&n.stepId!==i.stepId){e.tabs.forEach(o=>{const s=o.data.get();s.collectionId===n.collectionId&&fi(s,Ka.Step)&&s.workflowId===n.workflowId&&s.stepId===n.stepId&&o.data.stepId.set(i.stepId)});return}}},[e]);return{tabs:e.tabs,activeTabIdx:e.activeTabIdx,getExistingTabIndex:a,getExistingTab:t,handleIdChange:r}}function fi(e,a){return e.type===a}const NM=fSe({});let gSe=null;function vSe(e){gSe!==e&&(gSe=e,NM.configure({validate:!0,schemas:[{uri:"stub://test",fileMatch:["*"],schema:e}]}))}function bSe(e){const a=_M.create("stub.json","json",0,e),t=NM.parseJSONDocument(a);return{textDoc:a,jsonDoc:t}}const ySe=Ai.define({create(){},update(e){return e}}),kSe=e=>e.field(ySe,!1),lSt=({store:e,isResponse:a,apiOperation:t})=>{const r=_$(e).data.get();let n=t?.body?.mediaTypes?.[Lo.JSON]?.schema;if(fi(r,Ka.Step)&&a){const i=r.response?.status;i&&(n=t?.responses?.[i]?.mediaTypes?.[Lo.JSON]?.schema)}return[ySe.init(()=>({schema:Td(n||{}),store:e}))]};function cSt(){return async e=>{const{schema:a}=kSe(e.state)||{};if(!a)return[];vSe(a);const t=e.state.doc,{textDoc:r,jsonDoc:n}=bSe(t.toString());return(await NM.doValidation(r,n))?.map(i=>({from:HD(t,i.range.start),to:HD(t,i.range.end),message:i.message,severity:pSt[i.severity||3]}))}}const uSt=wu.highest(ob.of([{key:"Tab",run:e=>J0e(e)}]));function dSt(){return async function(e){const a={from:e.pos,to:e.pos,options:[],filter:!1},{schema:t}=kSe(e.state)||{};if(!t)return a;vSe(t);const r=e.state.doc,n=HD.bind(null,r),{textDoc:i,jsonDoc:o}=bSe(r.toString()),s=e.state.doc.lineAt(e.pos),l=s.number-1,c=e.pos-s.from,u=await NM.doComplete(i,{line:l,character:c},o);if(!u)return a;const d=e.state.sliceDoc(s.from,e.pos);if(d.trim().endsWith(",")||hSt(d))return a;a.options=u.items.map(g=>({label:g.label,info:g.documentation,apply:b=>{if(!g.textEdit||!("range"in g.textEdit))return;const y=g.textEdit.range,v=g.textEdit.newText.search(/(\$1|\${1:.*?})/);let k=g.textEdit.newText.replace(/(\$1|\${1:.*?})/,"");const z=v===-1?0:v-k.length;b.dispatch({changes:{from:n(y.start),to:n(y.end),insert:k}});const C=k.length-(y.end.character-y.start.character);b.dispatch({selection:oa.single(n(y.end)+C+z)})}}))||[];const p=e.state.wordAt(e.pos),m=p?.from?e.state.sliceDoc(p?.from,p?.to).toLowerCase():"";return m&&(a.options=a.options.filter(g=>g.label.toLowerCase().replace(/^"/,"").startsWith(m))),a}}const pSt={1:"error",2:"warning",3:"info",4:"hint"};function HD(e,a){return e.line(a.line+1).from+a.character}function hSt(e){try{return JSON.parse(`{${e}}`),!0}catch{return!1}}const xSe=ht.define();function jb(e){const a=e.activeEnvironmentId.get();return e.environments.find(t=>t.name.get()===a)?.get()||e.environments[0].get()}const FD=e=>zn.fromClass(class{decorations;constructor(a){this.decorations=this.buildDecorations(a,e)}update(a){(a.docChanged||a.viewportChanged)&&(this.decorations=this.buildDecorations(a.view,e))}buildDecorations(a,t){const r=jb(t.store)?.inputs,n=[],i=Na.mark({attributes:{style:"background-color: var(--bg-color-active);"}}),o=s=>Na.mark({attributes:{style:`color: var(--replay-${s?"undefined":"defined"}-variable-color); background-color: var(--replay-${s?"undefined":"defined"}-variable-bg-color);`}});for(const{from:s,to:l}of a.visibleRanges){const c=a.state.doc.sliceString(s,l),u=BA(c);for(const d of u){const p=s+d.start,m=s+d.end;if(!(p>=m))if(d.prefix==="inputs"){const g=gL(d.match),b=!r?.find(y=>y.name===g)?.value;n.push({from:p,to:m,value:o(b)})}else n.push({from:p,to:m,value:i})}}return Na.set(n,!0)}},{decorations:a=>a.decorations}),mSt=fSe({});function fSt(e){if(!e||typeof e!="object")return!1;const a=e;return typeof a.type=="string"&&typeof a.offset=="number"&&typeof a.length=="number"}function gSt(e){const a=[];if(!e)return a;const t=[e];for(;t.length>0;){const r=t.pop();if(r.type==="property"){r.valueNode&&t.push(r.valueNode);continue}if(r.type==="string"){const n=r.offset,i=r.offset+r.length;i>n&&a.push({from:n,to:i})}if(r.children&&r.children.length)for(const n of r.children)t.push(n)}return a}const vSt=e=>zn.fromClass(class{decorations;constructor(a){this.decorations=this.buildDecorations(a,e)}update(a){(a.docChanged||a.viewportChanged)&&(this.decorations=this.buildDecorations(a.view,e))}buildDecorations(a,t){const r=a.state.doc.toString();let n;try{const u=_M.create("inmemory://model.json","json",0,r),d=mSt.parseJSONDocument(u)?.root;n=fSt(d)?d:void 0}catch{n=void 0}const i=jb(t.store)?.inputs,o=Na.mark({attributes:{style:"background-color: var(--bg-color-active);"}}),s=u=>Na.mark({attributes:{style:`color: var(--replay-${u?"undefined":"defined"}-variable-color); background-color: var(--replay-${u?"undefined":"defined"}-variable-bg-color);`}}),l=[];if(!n)return Na.set([],!0);const c=gSt(n);for(const u of c){if(!a.visibleRanges.some(b=>Math.max(b.from,u.from)<Math.min(b.to,u.to))||!(r[u.from]==='"'&&r[u.to-1]==='"'))continue;const d=u.from+1,p=u.to-1;if(p<=d)continue;const m=a.state.doc.sliceString(d,p),g=BA(m);for(const b of g){const y=d+b.start,v=d+b.end;if(!(y>=v))if(b.prefix==="inputs"){const k=gL(b.match),z=!i?.find(C=>C.name===k)?.value;l.push({from:y,to:v,value:s(z)})}else l.push({from:y,to:v,value:o})}}return Na.set(l,!0)}},{decorations:a=>a.decorations}),Eu={[Lo.Text]:{name:"Text",extensions:[wa.lineWrapping],stateExtensions:[FD]},[Lo.JSON]:{name:"JSON",extensions:[xyt(),Q0t(cSt(),{delay:0,needsRefresh:e=>e.transactions.some(a=>a.effects.some(t=>t.is(xSe)))}),i0e.data.of({autocomplete:dSt()}),uSt],stateExtensions:[lSt,vSt]},[Lo.XML]:{name:"XML",extensions:[$0t()],stateExtensions:[FD]}},bSt={[Lo.Image]:{name:"Image",extensions:[],stateExtensions:[]}},ySt={[Lo.HTML]:{name:"HTML",extensions:[f0t()],stateExtensions:[FD]}},Ah={...Eu,...bSt,...ySt},wSe={[Lo.FormData]:{name:"form-data",extensions:void 0},[Lo["application/x-www-form-urlencoded"]]:{name:"x-www-form-urlencoded",extensions:void 0}},zSe={[Lo.Binary]:{name:"Binary",extensions:void 0}},ff={...Eu,...wSe,...zSe},kSt=Object.keys(Eu),GD=Object.keys(wSe),SSe=Object.keys(zSe);function CSe(e=[],a){const t={};return e.forEach(r=>{const n=String(r[a]);t[n]||(t[n]=[]),t[n].push(r)}),t}const kx={active:!0,key:"",value:""};function Ph(e,a){return[...e.map(t=>({id:crypto.randomUUID(),key:t.name,value:a.initializeWithInputs?`$inputs.${t.name}`:t.example?String(t.example):"",active:a.initializeWithInputs?!0:!!t.example,in:t.in})),Ln(a.in)]}function xx(e,a){const[t]=e.split("?"),r=a.slice(0,-1).filter(n=>n.active).map(n=>`${n.key}=${n.value}`).join("&");return`${t}${r?`?${r}`:""}`}function Wl(){return{id:crypto.randomUUID(),...kx}}function Ds(){return{id:crypto.randomUUID(),...kx,description:""}}function Ln(e){return{...kx,id:crypto.randomUUID(),in:e}}function gf(){return{id:crypto.randomUUID(),...kx,type:"text",files:null}}function qD(){return{id:crypto.randomUUID(),...kx,sendIn:Co.URL}}function JD(e){return e.map(a=>({id:crypto.randomUUID(),key:"",value:a,active:!0}))}function DM(e,a){return e.filter(t=>t.active&&t.value).map(({value:t})=>(a?Br(t,a):t).trim())}function Mh(e,a){const t=a.filter(r=>!!r).flatMap(r=>r).filter(r=>r.key&&r.active);return["path","header"].includes(e)?Array.from(new Map(t.map(r=>[r.key,r])).values()):t}function jSe(e,a){return e.map(({value:t,...r})=>({...r,value:Br(t,a)}))}function xSt(e,a){if(!e.startsWith("$components.parameters."))return null;const t=e.replace("$components.parameters.","");return t&&a[t]||null}function Rn(e=[],a={}){const t=[];for(const r of e)if(Up(r)){const n=xSt(r.reference,a);n&&t.push({...n,active:r.active,value:r.value||n.value})}else t.push(r);return t}function Th(e){return Object.entries(e).map(([a,t])=>({id:crypto.randomUUID(),key:"",value:a,active:!0,description:t}))}function wSt(e){return e.replace(/{/g,"{{").replace(/}/g,"}}")}const OSe={documentedOAuth2Types:[],grantType:We.ClientCredentials,authRequestExtraParams:[Wl()],tokenRequestExtraParams:[qD()],[We.ClientCredentials]:{clientId:"",clientSecret:"",clientAssertion:"",tokenUrl:"",scopes:[Ds()],accessToken:""},[We.ClientCredentialsWithJwtAssertion]:{clientId:"",clientSecret:"",clientAssertion:"",tokenUrl:"",scopes:[Ds()],accessToken:""},[We.AuthorizationCode]:{clientId:"",clientSecret:"",tokenUrl:"",authorizationUrl:"",callbackUrl:"",availableScopes:[],scopes:[Ds()],codeVerifier:"",codeChallenge:"",accessToken:""},[We.AuthorizationCodeWithPkce]:{clientId:"",clientSecret:"",tokenUrl:"",authorizationUrl:"",callbackUrl:"",availableScopes:[],scopes:[Ds()],codeVerifier:"",codeChallenge:"",accessToken:""},[We.Implicit]:{clientId:"",authorizationUrl:"",callbackUrl:"",availableScopes:[],scopes:[Ds()],accessToken:""},[We.Password]:{username:"",password:"",clientId:"",clientSecret:"",tokenUrl:"",accessToken:"",scopes:[Ds()]}},zSt={securityType:qe.NoAuth,securitySchemeId:null,[qe.BasicAuth]:{username:"",password:""},[qe.JWT]:{token:""},[qe.DigestAuth]:{username:"",password:"",nc:"00000001",realm:"",nonce:"",opaque:"",qop:"",algorithm:"",cnonce:""},[qe.APIKey]:{location:rl.Header,name:"",key:""},[qe.OAuth2]:OSe,[qe.OpenIDConnect]:{...OSe,openIdConnectUrl:"",userInfoUrl:""}},UD="urn:ietf:params:oauth:client-assertion-type:jwt-bearer",SSt={[Bo.SIMPLE]:{condition:"",type:Bo.SIMPLE},[Bo.REGEX]:{condition:"",type:Bo.REGEX,context:""},[Bo.JSONPATH]:{condition:"",type:Bo.JSONPATH,context:""},[Bo.XPATH]:{condition:"",type:Bo.XPATH,context:""}};function $M(){return structuredClone({type:Ji.Text,content:"",activeExampleName:"",formData:{"multipart/form-data":[gf()],"application/x-www-form-urlencoded":[gf()]},binary:null})}const CSt={method:"GET",url:"",security:[_u()],body:$M(),queryParameters:[Wl()],headers:[Wl()],cookies:[Wl()],pathParameters:[Wl()]};function ASe(){return structuredClone(CSt)}function _u(){return Td(zSt)}function jSt(e){return Td({id:crypto.randomUUID(),...SSt[e]})}function PSe(e,a,t){for(const r of t){const n=MSe(e,r),i=MSe(a,r);if(typeof n=="object"&&typeof i=="object"){if(!PSe(n,i,t))return!1}else if(n!==i)return!1}return!0}function MSe(e,a){const t=a.split("/");let r=e;for(const n of t)if(r&&typeof r=="object"&&n in r)r=r[n];else return;return r}function OSt(e,a){return e.length===a.length&&e.sort().join()===a.sort().join()}function ASt(e,a){return e.every(t=>a.includes(t))}function PSt(e){switch(e){case"query":return rl.Query;case"cookie":return rl.Cookie;case"header":return rl.Header;default:return}}function MSt(e,a,t){const{security:r}=a,n=Eut(e);if(!t)return!1;const i=WD(t),o=i.map(c=>c.securityType),s=r.map(c=>c.securityType);if(!OSt(o,s))return!0;let l=[];return r.forEach(c=>{const u=c.securityType,d=c[qe.OAuth2]?.grantType,p=o.includes(u),m=i.find(v=>v.securityType===u),g=!m||PSe(c,m,BSt(u,d)),b=TSt(c,u,c[qe.OAuth2]?.grantType,n),y=!!(p&&m&&g&&b);l.push(!t.security?.length||y)}),l.includes(!1)}function TSt(e,a,t,r){if(a===qe.OAuth2&&(t===We.AuthorizationCode||t===We.AuthorizationCodeWithPkce||t===We.Implicit)){const n=e[qe.OAuth2][t]?.availableScopes,i=DM(e[qe.OAuth2][t]?.scopes,r);return ASt(i,n)}return!0}function BSt(e,a){return e===qe.APIKey?[`${qe.APIKey}/name`,`${qe.APIKey}/location`]:e===qe.OAuth2?[`${qe.OAuth2}/grantType`,...ESt(a)]:e===qe.OpenIDConnect?[`${qe.OpenIDConnect}/openIdConnectUrl`]:[]}function ESt(e){return e===We.ClientCredentials?[`${qe.OAuth2}/${We.ClientCredentials}/tokenUrl`]:e===We.Password?[`${qe.OAuth2}/${We.Password}/tokenUrl`]:e===We.Implicit?[`${qe.OAuth2}/${We.Implicit}/authorizationUrl`]:e===We.AuthorizationCode?[`${qe.OAuth2}/${We.AuthorizationCode}/tokenUrl`,`${qe.OAuth2}/${We.AuthorizationCode}/authorizationUrl`]:e===We.AuthorizationCodeWithPkce?[`${qe.OAuth2}/${We.AuthorizationCodeWithPkce}/tokenUrl`,`${qe.OAuth2}/${We.AuthorizationCodeWithPkce}/authorizationUrl`]:[]}function _St(e){return e.map(a=>{const t=a.map(r=>r.id).join("_");return a.map(r=>({...r,schemeId:t}))})}function LSt(e){const a=e.security||[],t=a.map(r=>{let n="";const i=[];return r.forEach((o,s)=>{n=s===0?`${o.id}`:`${n}_${o.id}`,i.push(ZD(o))}),{id:n,security:i}});return a.length?t:[]}function RSt(e,a){const t=e.security||[];return t?.length?_Se(t).map((r,n)=>ZD(r)):[]}function WD(e){const a=(e.security||[])[0];return a?a.map(t=>ZD(t)):[_u()]}function ZD(e,a){const t={..._u(),securitySchemeId:e.id},r=IM(e);t.securityType=r;const n=e.id;if(e.id&&r!==qe.NoAuth&&(t[r].schemeName=e.id),r===qe.BasicAuth&&(t[qe.BasicAuth].username||(t[qe.BasicAuth].username=kn(n+tt.Username)),t[qe.BasicAuth].password||(t[qe.BasicAuth].password=kn(n+tt.Password))),r===qe.DigestAuth&&(t[qe.DigestAuth].username||(t[qe.DigestAuth].username=kn(n+tt.Username)),t[qe.DigestAuth].password||(t[qe.DigestAuth].password=kn(n+tt.Password))),r===qe.JWT&&!t[qe.JWT].token&&(t[qe.JWT].token=kn(n+tt.JWTToken)),r===qe.APIKey&&!t[qe.APIKey].key){t[qe.APIKey].name=e.name||"",t[qe.APIKey].key=kn(n+tt.APIKey);const i=PSt(e.in);i&&(t[qe.APIKey].location=i)}if(r===qe.OAuth2){const i=YD(e),o=kn(n+tt.Token),s=t[qe.OAuth2];s.grantType=i[0],i.forEach(l=>{l===We.AuthorizationCode&&!s[We.AuthorizationCode].accessToken&&(s[We.AuthorizationCode].accessToken=o,s[We.AuthorizationCode].clientId=kn(n+tt.ClientId),s[We.AuthorizationCode].authorizationUrl=e.flows?.authorizationCode?.authorizationUrl||"",s[We.AuthorizationCode].tokenUrl=e.flows?.authorizationCode?.tokenUrl||"",s[We.AuthorizationCode].clientSecret=kn(n+tt.ClientSecret),s[We.AuthorizationCode].availableScopes=Object.keys(e.flows?.authorizationCode?.scopes||{})||[],s[We.AuthorizationCode].scopes=[...Th(e.flows?.authorizationCode?.scopes||{})||[],Ds()]),l===We.AuthorizationCodeWithPkce&&!s[We.AuthorizationCodeWithPkce].accessToken&&(s[We.AuthorizationCodeWithPkce].accessToken=o,s[We.AuthorizationCodeWithPkce].clientId=kn(n+tt.ClientId),s[We.AuthorizationCodeWithPkce].authorizationUrl=e.flows?.authorizationCode?.authorizationUrl||"",s[We.AuthorizationCodeWithPkce].tokenUrl=e.flows?.authorizationCode?.tokenUrl||"",s[We.AuthorizationCodeWithPkce].clientSecret=kn(n+tt.ClientSecret),s[We.AuthorizationCodeWithPkce].availableScopes=Object.keys(e.flows?.authorizationCode?.scopes||{})||[],s[We.AuthorizationCodeWithPkce].scopes=[...Th(e.flows?.authorizationCode?.scopes||{}),Ds()]),l===We.ClientCredentials&&!s[We.ClientCredentials].accessToken&&(s[We.ClientCredentials].accessToken=o,s[We.ClientCredentials].clientId=kn(n+tt.ClientId),s[We.ClientCredentials].clientSecret=kn(n+tt.ClientSecret),s[We.ClientCredentials].tokenUrl=e.flows?.clientCredentials?.tokenUrl||"",s[We.ClientCredentials].scopes=[...Th(e.flows?.clientCredentials?.scopes||{}),Ds()]),l===We.ClientCredentialsWithJwtAssertion&&!s[We.ClientCredentialsWithJwtAssertion].accessToken&&(s[We.ClientCredentialsWithJwtAssertion].accessToken=o,s[We.ClientCredentialsWithJwtAssertion].clientId=kn(n+tt.ClientId),s[We.ClientCredentialsWithJwtAssertion].clientAssertion=kn(n+tt.ClientAssertion),s[We.ClientCredentialsWithJwtAssertion].scopes=[...Th(e.flows?.clientCredentials?.scopes||{}),Ds()]),l===We.Implicit&&!s[We.Implicit].accessToken&&(s[We.Implicit].accessToken=o,s[We.Implicit].clientId=kn(n+tt.ClientId),s[We.Implicit].authorizationUrl=e.flows?.implicit?.authorizationUrl||"",s[We.Implicit].availableScopes=Object.keys(e.flows?.implicit?.scopes||{})||[],s[We.Implicit].scopes=[...Th(e.flows?.implicit?.scopes||{}),Ds()]),l===We.Password&&!s[We.Password].accessToken&&(s[We.Password].accessToken=o,s[We.Password].clientId=kn(n+tt.ClientId),s[We.Password].clientSecret=kn(n+tt.ClientSecret),s[We.Password].tokenUrl=e.flows?.password?.tokenUrl||"",s[We.Password].scopes=[...Th(e.flows?.password?.scopes||{}),Ds()])})}if(r===qe.OpenIDConnect){const i=kn(n+tt.Token),o=t[qe.OpenIDConnect];o[We.AuthorizationCode].accessToken||(o[We.AuthorizationCode].accessToken=i,o[We.AuthorizationCode].clientId=kn(n+tt.ClientId),o[We.AuthorizationCode].clientSecret=kn(n+tt.ClientSecret),o[We.AuthorizationCode].tokenUrl=e.flows?.authorizationCode?.tokenUrl||""),o[We.AuthorizationCodeWithPkce].accessToken||(o[We.AuthorizationCodeWithPkce].accessToken=i,o[We.AuthorizationCodeWithPkce].clientId=kn(n+tt.ClientId),o[We.AuthorizationCodeWithPkce].clientSecret=kn(n+tt.ClientSecret),o[We.AuthorizationCodeWithPkce].tokenUrl=e.flows?.authorizationCode?.tokenUrl||""),o[We.Implicit].accessToken||(o[We.Implicit].accessToken=i,o[We.Implicit].clientId=kn(n+tt.ClientId))}return t}function NSt(e,a="",t){const r=CSe(e.parameters,"in"),n=TSe(e),i=WD(e),o=Ph(r.query||[],{in:"query"});return{id:crypto.randomUUID(),name:e.name,operationId:e.operationId,collectionPath:t,apiPath:{path:e.path,method:e.method},apiId:a,request:{pathParameters:Ph(r.path||[],{in:"path"}),method:e.method.toLocaleUpperCase(),url:xx(wSt(e.path),o),headers:Ph(r.header||[],{in:"header"}),queryParameters:o,cookies:Ph(r.cookie||[],{in:"cookie"}),body:n,security:i},response:null}}function QD(e){const a=CSe(e.parameters,"in"),t=TSe(e),r=WD(e);return{parameters:{queryParameters:Ph(a.query||[],{in:"query"}),headers:Ph(a.header||[],{in:"header"}),cookies:Ph(a.cookie||[],{in:"cookie"}),pathParameters:Ph(a.path||[],{initializeWithInputs:!0,in:"path"})},requestBody:t,security:r}}function TSe(e){const a=e.body?.mediaTypes;if(!a||!Object.keys(a).length)return $M();const t=DSt(a,e),r=t?.name||"",n=!GD.includes(r)&&!SSe.includes(r),i=XD(t),o=n&&i.length?JSON.stringify(i.find(({key:s})=>s===e.body?.activeExampleName)?.value,null,2)||JSON.stringify(i[0].value,null,2):"";return{...$M(),activeExampleName:e.body?.activeExampleName||i[0]?.key||"",...t&&{type:t.name},content:o,formData:{"multipart/form-data":ESe(a[Lo.FormData]),"application/x-www-form-urlencoded":ESe(a[Lo["application/x-www-form-urlencoded"]])}}}function BSe(e){return e?{...(Object.keys(e?.body?.mediaTypes||{})||[]).reduce((a,t)=>(a[t]={name:t,extensions:void 0},a),{}),...ff}:ff}function ESe(e){if(!e)return[gf()];if(!e.parameters)return[gf()];const a=e.parameters.map(t=>({id:crypto.randomUUID(),key:t.name,value:String(t.example)||"",active:!0,type:t.inputType,files:null}));return a.push(gf()),a}function XD(e){const a=e?.examples;return Object.keys(a||{}).map(t=>{const r=a?.[t];return{name:om(r?.summary)?r?.summary:r?.summary?.raw||t,key:t,value:a?.[t].value}})}function DSt(e,a){const t=BSe(a),r=Object.keys(e).find(n=>!!t[n]);return r?e[r]:null}function $St(e){return!e?.security?.length||!e?[]:RSt(e)}function _Se(e){const a=new Set;return e.flat().filter(t=>a.has(t.id)?!1:(a.add(t.id),!0))}function IM(e){if(e.type==="http"){if(e.scheme==="bearer")return qe.JWT;if(e.scheme==="basic")return qe.BasicAuth;if(e.scheme==="digest")return qe.DigestAuth}else{if(e.type==="apiKey")return qe.APIKey;if(e.type==="oauth2")return qe.OAuth2;if(e.type==="openIdConnect")return qe.OpenIDConnect}return qe.NoAuth}function ISt(e,a){if(e==="clientCredentials"&&a&&"x-assertionType"in a&&a["x-assertionType"]===UD)return We.ClientCredentialsWithJwtAssertion;if(e==="authorizationCode"&&a&&"x-usePkce"in a&&a["x-usePkce"])return We.AuthorizationCodeWithPkce;switch(e){case"implicit":return We.Implicit;case"password":return We.Password;case"clientCredentials":return We.ClientCredentials;case"authorizationCode":return We.AuthorizationCode;default:return We.AuthorizationCode}}function KSt(e,a){const t=e?.security;if(!t?.length)return[];const r=_St(t).flat().filter(n=>n.schemeId===a).find(n=>IM(n)===qe.OAuth2);return YD(r)}function YD(e){return Object.entries(e?.flows||{}).map(([a,t])=>ISt(a,t)).filter(Boolean)}async function wx(e){try{const a=await Hmt(e),t=await jbe(e);return{absolutePath:e,file:new File([a],t)}}catch(a){return console.error("Failed to init replay file",a),null}}async function LSe(e){return(await Promise.allSettled(e.map(a=>wx(a)))).map(a=>a.status==="fulfilled"?a.value:null).filter(a=>a!==null)}async function VSt(e,a,t,r,n,i){const o=await Promise.all(e.sourceDescriptions.map(async l=>({name:l.name,url:l.url,type:l.type,apiId:await HSt({projectPath:r,apiUrl:l.url,collectionId:a})}))),s={inputs:e.components?.inputs||{},parameters:Object.fromEntries(Object.entries(e.components?.parameters||{}).map(([l,c])=>[l,{...c,key:c.name,value:c.value,id:crypto.randomUUID(),active:!0}]))};return{...e,id:a,srcType:t,state:sr.Normal,sourceDescriptions:o,components:s,workflows:await Promise.all(e.workflows.map(async l=>({...l,state:sr.Normal,parameters:qSe(l.parameters,l["x-replay-disabled-parameters"],e.components?.parameters),outputs:FSe(l.outputs),security:KSe(l["x-security"]),steps:await Promise.all(l.steps.map(async c=>{const u=qSe(c.parameters,c["x-replay-disabled-parameters"],e.components?.parameters),d=c["x-operation"]??null;d&&(d.url=xx(d.url,u.queryParameters.filter(Jre)));const p=FSt(c,o,n);let m;if(p&&i){const b=n?.find(y=>y.id===p.apiId);m=i(p.path,p.method,b)}delete c.operationId,delete c["x-operation"];const g=await ZSt(c.requestBody,r);return{...c,state:sr.Normal,parameters:u,outputs:FSe(c.outputs),successCriteria:c.successCriteria?.map(b=>({...b,type:b.type??Bo.SIMPLE}))||[],requestBody:g,xOperation:d,security:KSe(c["x-security"],m),operation:p}}))})))}}async function HSt({projectPath:e,apiUrl:a,collectionId:t}){if(Ebe(a))return a;if(await nn.isAbsolute(a))return await nn.relative(e,a);const r=await nn.resolve(await nn.join(e,t,"..",a));return await nn.relative(e,r)}function FSt(e,a,t){if(e["x-operation"])return null;const{path:r,method:n,apiId:i}=NSe({operationPath:e.operationPath,parsedSourceDescriptions:a}),{operationId:o,apiId:s}=GSt({operationId:e.operationId,parsedSourceDescriptions:a}),l=s||i||a[0]?.apiId||"",c=t?.find(u=>u.id===l);if(o&&c&&!r&&!n){const u=XSt(o,c);return{apiId:l,path:u?.path??"",method:u?.method??"",operationId:o}}return{apiId:l,path:r??"",method:n??"",operationId:o}}function GSt({operationId:e,parsedSourceDescriptions:a}){if(!e)return{operationId:"",apiId:null};const t=e.split(".");if(t.length===1)return{operationId:e,apiId:a[0]?.apiId??""};const[,r,n=""]=t,i=a.find(({name:o})=>o===r);return{operationId:n,apiId:i?.apiId??""}}function RSe(e){return"reference"in e&&typeof e.reference=="string"}function NSe({operationPath:e,parsedSourceDescriptions:a}){if(!e)return{apiId:null,path:"",method:""};try{const t=e.split("#"),r=t.length>1?t[1]:t[0],n=t.length>1?t[0]:"";if(!r)return{path:"",method:"",apiId:null};let i=null,o=null;const s=/\$sourceDescriptions\.(.+)\.url/,l=n.match(s);if(l&&(i=l[1]),i){const d=a.find(({name:p})=>p===i);d&&(o=d.apiId)}const c=r.split("/"),u=c.pop()||"";return{path:Di.unescape(c.pop()||""),method:u.toLowerCase(),apiId:o}}catch{return{path:"",method:"",apiId:null}}}function qSt(e){switch(e.type){case"apiKey":return qe.APIKey;case"oauth2":return qe.OAuth2;case"openIdConnect":return qe.OpenIDConnect;case"http":return e.scheme==="basic"?qe.BasicAuth:e.scheme==="digest"?qe.DigestAuth:e.scheme==="bearer"?qe.JWT:qe.NoAuth;default:return qe.NoAuth}}function DSe(e,a){const t={clientCredentials:We.ClientCredentials,authorizationCode:We.AuthorizationCode,implicit:We.Implicit,password:We.Password,clientCredentialsWithJwtAssertion:We.ClientCredentialsWithJwtAssertion,authorizationCodeWithPkce:We.AuthorizationCodeWithPkce};return e==="clientCredentials"&&a["x-assertionType"]==="urn:ietf:params:oauth:client-assertion-type:jwt-bearer"?We.ClientCredentialsWithJwtAssertion:e==="authorizationCode"&&a["x-usePkce"]?We.AuthorizationCodeWithPkce:t[e]??null}function JSt(e){return{query:rl.Query,header:rl.Header,cookie:rl.Cookie}[e.toLowerCase()]||rl.Header}function USt(e){return{body:Co.Body,header:Co.Header,url:Co.URL}[e.toLowerCase()]||Co.URL}function $Se(e,a,t){return Object.keys(e).reduce((r,n)=>{const i=DSe(n,e[n]);if(!i)return r;switch(i){case We.ClientCredentials:r[i]={...t[i],clientId:a.clientId??"",clientSecret:a.clientSecret??"",clientAssertion:a.clientAssertion??"",tokenUrl:e[n].tokenUrl??"",scopes:vf(e[n].scopes,e[n]["x-replay-disabled-scopes"]),accessToken:a.accessToken??""};break;case We.AuthorizationCode:r[i]={...t[i],clientId:a.clientId??"",clientSecret:a.clientSecret??"",tokenUrl:e[n].tokenUrl??"",authorizationUrl:e[n].authorizationUrl??"",callbackUrl:a.callbackUrl??"",availableScopes:e[n].availableScopes??[],scopes:vf(e[n].scopes,e[n]["x-replay-disabled-scopes"]),accessToken:a.accessToken??""};break;case We.Implicit:r[i]={...t[i],clientId:a.clientId??"",authorizationUrl:e[n].authorizationUrl??"",callbackUrl:a.callbackUrl??"",availableScopes:vf(e[n].availableScopes),scopes:vf(e[n].scopes,e[n]["x-replay-disabled-scopes"]),accessToken:a.accessToken??""};break;case We.Password:r[i]={...t[i],tokenUrl:e[n].tokenUrl??"",username:a.username??"",password:a.password??"",clientId:a.clientId??"",clientSecret:a.clientSecret??"",accessToken:a.accessToken??""};break;case We.ClientCredentialsWithJwtAssertion:r[i]={...t[i],clientAssertion:a.clientAssertion??"",tokenUrl:e[n].tokenUrl??"",scopes:vf(e[n].scopes,e[n]["x-replay-disabled-scopes"]),clientId:a.clientId??"",clientSecret:a.clientSecret??"",accessToken:a.accessToken??""};break;case We.AuthorizationCodeWithPkce:r[i]={...t[i],tokenUrl:e[n].tokenUrl??"",authorizationUrl:e[n].authorizationUrl??"",callbackUrl:a.callbackUrl??"",availableScopes:vf(e[n].availableScopes),scopes:vf(e[n].scopes,e[n]["x-replay-disabled-scopes"]),codeVerifier:a.codeVerifier??"",codeChallenge:a.codeChallenge??"",clientId:a.clientId??"",clientSecret:a.clientSecret??"",accessToken:a.accessToken??""};break}return r},t)}function ISe(e,a,t){const r={..._u(),securityType:e},n=Object.keys(a.flows||{})[0],i=DSe(n,a.flows?.[n])??We.ClientCredentials;switch(e){case qe.BasicAuth:return{...r,[qe.BasicAuth]:{username:t.username,password:t.password,schemeName:a.id}};case qe.JWT:return{...r,[qe.JWT]:{token:t.token,schemeName:a.id}};case qe.DigestAuth:return{...r,[qe.DigestAuth]:{...r[qe.DigestAuth],username:t.username,password:t.password,schemeName:a.id}};case qe.APIKey:return{...r,[qe.APIKey]:{location:JSt(a.in),name:a.name,key:t.apiKey,schemeName:a.id}};case qe.OAuth2:return{...r,[qe.OAuth2]:{...r[qe.OAuth2],...$Se(a.flows||{},t||{},r[qe.OAuth2]),authRequestExtraParams:VSe(t.authRequestExtraParams),tokenRequestExtraParams:HSe(t.tokenRequestExtraParams),grantType:i,schemeName:a.id}};case qe.OpenIDConnect:return{...r,[qe.OpenIDConnect]:{...r[qe.OpenIDConnect],...$Se(t.flows||{},t||{},r[qe.OpenIDConnect]),openIdConnectUrl:t.openIdConnectUrl,userInfoUrl:t.userInfoUrl,authRequestExtraParams:VSe(t.authRequestExtraParams),tokenRequestExtraParams:HSe(t.tokenRequestExtraParams),grantType:i,schemeName:a.id}};default:return r}}function WSt(e,a){return[...e.map(t=>{if("scheme"in t){const n=qSt(t.scheme);return ISe(n,t.scheme,t.values)}const r=a.find(n=>n.id===t.schemeName);if(r){const n=IM(r),i=ISe(n,r,t.values);return i.securitySchemeId=r.id,i}return _u()})]}function KSe(e=[],a){const t=_Se(a?.security||[]);return e.length?WSt(e,t):[_u()]}function vf(e,a){const t=Th(e||{}),r=Th(a||{});return[...t,...r,Ds()]}function VSe(e){return(e||[]).map(a=>({id:crypto.randomUUID(),key:a.key??"",value:a.value??"",active:a.active??!0})).concat(Wl())}function HSe(e){return(e||[]).map(a=>({id:crypto.randomUUID(),key:a.key??"",value:a.value??"",active:a.active??!0,sendIn:USt(a.in)})).concat(qD())}function FSe(e){if(!e)return[Wl()];const a=[];for(const t in e)a.push({id:crypto.randomUUID(),key:t,value:e[t],active:!0});return a.push(Wl()),a}const KM={query:"queryParameters",path:"pathParameters",header:"headers",cookie:"cookies"};function GSe(e,a){const t="$components.parameters.";if(e.reference.startsWith(t)){const r=e.reference.replace(t,"");return a?.[r]}}function qSe(e,a,t){if(!e&&!a)return{pathParameters:[Ln("path")],queryParameters:[Ln("query")],headers:[Ln("header")],cookies:[Ln("cookie")]};const r={pathParameters:[],queryParameters:[],headers:[],cookies:[]};if(e)for(const n of e)if(RSe(n)){const i=GSe(n,t),o=KM[i?.in];o&&r[o].push({reference:n.reference,active:!0,value:n.value})}else r[KM[n.in]].push({id:crypto.randomUUID(),key:n.name,value:n.value,active:!0,in:n.in});if(a)for(const n of a)if(RSe(n)){const i=GSe(n,t),o=KM[i?.in];o&&r[o].push({reference:n.reference,active:!1,value:n.value})}else r[KM[n.in]].push({id:crypto.randomUUID(),key:n.name,value:n.value,active:!1,in:n.in});return r.pathParameters.push(Ln("path")),r.queryParameters.push(Ln("query")),r.headers.push(Ln("header")),r.cookies.push(Ln("cookie")),r}async function ZSt(e,a){const t=ASe().body;if(!e)return t;switch(e.contentType){case"application/x-www-form-urlencoded":case"multipart/form-data":return{...t,type:e.contentType,formData:await QSt(e,a)};case"application/octet-stream":const r=e.payload?await WSe(e.payload,a):[],n=r.length>0?await wx(r[0]):null;return{...t,type:e.contentType,binary:n};case"application/json":case"application/ld+json":return{...t,type:e.contentType,content:USe(e.payload)};default:{const i=typeof e.payload=="string",o=e.contentType||(i?"text/plain":"application/json");return{...t,type:o,content:i?e.payload:USe(e.payload)}}}}async function JSe(e,a,t,r){const n=await WSe(a,r),i=n.length>0||Array.isArray(a),o=i?await LSe(n):void 0;return{id:crypto.randomUUID(),key:e,value:i?"":a,type:i?"file":"text",active:t,files:o}}async function QSt(e,a){const t=ASe().body.formData,r=e.contentType,n=e.payload?await Promise.all(Object.entries(e.payload).map(([o,s])=>JSe(o,s,!0,a))):[],i=e["x-replay-disabled-payload"]?await Promise.all(Object.entries(e["x-replay-disabled-payload"]||{}).map(([o,s])=>JSe(o,s,!1,a))):[];return{...t,[r]:[...n,...i,gf()]}}function USe(e){return e?JSON.stringify(e,null,2):""}function XSt(e,a){for(const t of Object.keys(a.paths)){const r=a.paths[t];for(const n of Object.keys(r)){const i=n.toLowerCase();if(["get","put","post","delete","options","head","patch","trace"].includes(i)&&r[i]?.operationId===e)return{method:i,path:t}}}return null}async function WSe(e,a){return Array.isArray(e)?(await Promise.all(e.map(t=>ZSe(t,a)))).flat():typeof e=="string"?await ZSe(e,a):[]}async function ZSe(e,a){const t=/\$file\(['"](.+?)['"]\)/g,r=Array.from(e.matchAll(t));return Promise.all(r.map(n=>YSt(n[1],a)))}async function YSt(e,a){return await nn.isAbsolute(e)?e:await nn.resolve(await nn.join(a,e))}const hs=e=>!e||typeof e=="boolean"?{type:"object",properties:{}}:e.type?e:{...e,type:"object"},QSe=(e,a,t)=>{if(!e.properties)return e;const r=e.properties[a],n=hs(r);return{...e,properties:{...e.properties,[a]:{...n,...t}}}},e2t=(e,a,t)=>{if(!e.properties||a===t||!t.trim())return null;const r={...e.properties};return r[t]?null:(r[t]=r[a],delete r[a],{...e,properties:r})},a2t=(e,a)=>{if(!e.properties)return e;const t={...e.properties};return delete t[a],{...e,properties:t}},t2t=(e,a,t={type:"string"})=>{const r=e.properties||{};return{...e,type:"object",properties:{...r,[a]:t}}};function XSe(e){const a=Object.assign({},...(e||[]).filter(({key:t,active:r})=>t&&r).map(t=>({[t.key]:t.value})));if(Object.keys(a).length!==0)return a}function YSe(e){if(!e)return{};const a={queryParameters:"query",headers:"header",cookies:"cookie",pathParameters:"path"},t=[],r=[];return Object.keys(a).forEach(n=>{const i=n;e[i].forEach(o=>{if(Up(o)){const s={reference:o.reference,value:o.value||void 0};o.active?t.push(s):r.push(s)}else{if(!o.key)return;const s={name:o.key,in:a[i],value:o.value};o.active?t.push(s):r.push(s)}})}),{parameters:t.length>0?t:void 0,"x-replay-disabled-parameters":r.length>0?r:void 0}}function r2t(e){const a=e?.map(t=>({condition:t.condition,context:t.context,type:t.type==Bo.SIMPLE?void 0:t.type}));if(a?.length!==0)return a}function n2t(e){if(!(!e||e.length===0))return[...e]}async function e2e(e,a){return e.absolutePath?`$file('${await nn.relative(a,e.absolutePath)}')`:null}async function i2t(e,a){const{type:t,value:r,files:n}=e;switch(t){case"text":return r;case"file":let i=[];return n&&(i=(await Promise.all(Object.values(n).map(o=>e2e(o,a)))).filter(o=>o!==null)),i.length===0?"":i.length===1?i[0]:i}}async function o2t(e,a){const t=e.type,r=e.formData[t],n={},i={};return await Promise.all(r.map(async o=>{const{key:s,active:l}=o;if(!s)return;const c=await i2t(o,a);l?n[s]=c:i[s]=c})),{payload:Object.keys(n).length>0?n:void 0,"x-replay-disabled-payload":Object.keys(i).length>0?i:void 0}}function s2t(e){if(!e)return e;try{const a=JSON.parse(e);return typeof a=="object"?a:e}catch{return e}}async function l2t(e,a){if(e)switch(e.type){case"application/x-www-form-urlencoded":case"multipart/form-data":return{contentType:e.type,...await o2t(e,a)};case"application/octet-stream":return{contentType:e.type,payload:e.binary?await e2e(e.binary,a):null};case"application/json":case"application/ld+json":return e.content?{contentType:e.type,payload:s2t(e.content)}:void 0;default:return e.content?{contentType:e.type,payload:e.content}:void 0}}function c2t(e){return{...e.schemeName?{schemeName:e.schemeName}:{scheme:{type:"http",scheme:"basic"}},values:{username:e.username,password:e.password}}}function u2t(e){return{...e.schemeName?{schemeName:e.schemeName}:{scheme:{type:"apiKey",name:e.name,in:e.location.toLowerCase()}},values:{apiKey:e.key}}}function d2t(e){return{...e.schemeName?{schemeName:e.schemeName}:{scheme:{type:"http",scheme:"bearer"}},values:{token:e.token}}}function p2t(e){return{...e.schemeName?{schemeName:e.schemeName}:{scheme:{type:"http",scheme:"digest"}},values:{username:e.username,password:e.password}}}function h2t(e){const{flows:a,values:t}=r2e(e);return{...e.schemeName?{schemeName:e.schemeName}:{scheme:{type:"openIdConnect",flows:a}},values:{...t,openIdConnectUrl:e.openIdConnectUrl,userInfoUrl:e.userInfoUrl,authRequestExtraParams:a2e(e.authRequestExtraParams),tokenRequestExtraParams:t2e(e.tokenRequestExtraParams)}}}function m2t(e){const{flows:a,values:t}=r2e(e);return{...e.schemeName?{schemeName:e.schemeName}:{scheme:{type:"oauth2",flows:a}},values:{...t,authRequestExtraParams:a2e(e.authRequestExtraParams),tokenRequestExtraParams:t2e(e.tokenRequestExtraParams)}}}function Ob(e){const a={},t={};return e.forEach(r=>{r.value&&(r.active?a[r.value]=r.description:t[r.value]=r.description)}),{scopes:a,"x-replay-disabled-scopes":Object.keys(t).length>0?t:void 0}}function a2e(e){return e.filter(a=>a.value||a.key).map(a=>({key:a.key,value:a.value,active:a.active}))}function t2e(e){return e.filter(a=>a.value||a.key).map(a=>({key:a.key,value:a.value,active:a.active,in:a.sendIn.toLowerCase()}))}function r2e(e){let a;switch(e.grantType){case We.ClientCredentials:return a=e[We.ClientCredentials],{flows:{clientCredentials:{tokenUrl:a.tokenUrl,...Ob(a.scopes)}},values:{clientId:a.clientId,clientSecret:a.clientSecret,accessToken:a.accessToken}};case We.Implicit:return a=e[We.Implicit],{flows:{implicit:{authorizationUrl:a.authorizationUrl,...Ob(a.scopes)}},values:{clientId:a.clientId,accessToken:a.accessToken,callbackUrl:a.callbackUrl}};case We.Password:return a=e[We.Password],{flows:{password:{tokenUrl:a.tokenUrl,...Ob(a.scopes)}},values:{clientId:a.clientId,clientSecret:a.clientSecret,username:a.username,password:a.password,accessToken:a.accessToken}};case We.AuthorizationCode:return a=e[We.AuthorizationCode],{flows:{authorizationCode:{tokenUrl:a.tokenUrl,authorizationUrl:a.authorizationUrl,...Ob(a.scopes)}},values:{accessToken:a.accessToken,clientId:a.clientId,callbackUrl:a.callbackUrl}};case We.ClientCredentialsWithJwtAssertion:return a=e[We.ClientCredentialsWithJwtAssertion],{flows:{clientCredentials:{tokenUrl:a.tokenUrl,...Ob(a.scopes),"x-assertionType":"urn:ietf:params:oauth:client-assertion-type:jwt-bearer"}},values:{clientId:a.clientId,clientAssertion:a.clientAssertion,accessToken:a.accessToken}};case We.AuthorizationCodeWithPkce:return a=e[We.AuthorizationCodeWithPkce],{flows:{authorizationCode:{tokenUrl:a.tokenUrl,authorizationUrl:a.authorizationUrl,...Ob(a.scopes),"x-usePkce":!0}},values:{clientId:a.clientId,clientSecret:a.clientSecret,accessToken:a.accessToken,codeVerifier:a.codeVerifier,codeChallenge:a.codeChallenge,callbackUrl:a.callbackUrl}}}}function n2e(e){const a=e.map(t=>{switch(t.securityType){case qe.OpenIDConnect:{const r=t[qe.OpenIDConnect];return h2t(r)}case qe.OAuth2:{const r=t[qe.OAuth2];return m2t(r)}case qe.APIKey:{const r=t[qe.APIKey];return u2t(r)}case qe.BasicAuth:{const r=t[qe.BasicAuth];return c2t(r)}case qe.DigestAuth:{const r=t[qe.DigestAuth];return p2t(r)}case qe.JWT:{const r=t[qe.JWT];return d2t(r)}default:return null}}).filter(t=>t!==null);return{"x-security":a.length?a:void 0}}function f2t(e){const{inputs:a,parameters:t,...r}=e;let n=r;return Object.keys(a).length&&(n.inputs=a),Object.keys(t).length&&(n.parameters=Object.fromEntries(Object.entries(t).map(([i,{id:o,active:s,key:l,...c}])=>[i,{...c,name:l}]))),Object.keys(n).length||(n=void 0),n}async function g2t(e,a){const{id:t,state:r,srcType:n,sourceDescriptions:i,workflows:o,components:s,...l}=e;return{arazzoObject:{...l,sourceDescriptions:i.map(c=>({name:c.name,url:c.url,type:c.type||"openapi"})),components:f2t(s),workflows:await Promise.all(o.map(async({parameters:c,security:u,dependsOn:d,outputs:p,state:m,steps:g,inputs:b,...y})=>({...y,dependsOn:n2t(d),outputs:XSe(p),inputs:b?hs(b):void 0,...n2e(u),...YSe(c),steps:await Promise.all(g.map(async({parameters:v,security:k,operation:z,requestBody:C,successCriteria:w,outputs:S,state:O,xOperation:A,...B})=>{const L={operationId:void 0,operationPath:void 0,"x-operation":void 0};if(z){const q=e.sourceDescriptions.find(({apiId:N})=>N===z.apiId)||e.sourceDescriptions[0];if(z.operationId){const N=e.sourceDescriptions.length<=1;L.operationId=N?z.operationId:`$sourceDescriptions.${q.name}.${z.operationId}`}else L.operationPath=`{$sourceDescriptions.${q.name}.url}#/paths/${Di.escape(z.path)}/${z.method}`}else A&&(L["x-operation"]={...A,url:A.url.split("?")[0]});return{...B,...L,...n2e(k),...YSe(v),requestBody:await l2t(C,a),successCriteria:r2t(w),outputs:XSe(S)}}))})))}}}class v2t extends Rbe{constructor(a,t){super(a),this.convertOperationToReplayValue=t}parse(a,t){return VSt(a.content,a.uri,a.type,this.storage.baseDir,t,this.convertOperationToReplayValue)}async stringify(a){const{arazzoObject:t}=await g2t(a,this.storage.baseDir);return await nn.extname(a.id)===".json"?JSON.stringify(t,null,2):Jp.dump(t)}}class b2t{constructor(a,t){this.storage=a,this.localStorageSecretsProvider=t}default=[];async read(){const a=await this.storage.get("replay-environments.yaml"),t=await this.localStorageSecretsProvider.get();let r=null,n=null;if(!a)return this.default;try{r=Jp.load(a),n=t?JSON.parse(t):null}catch(i){return console.error("Failed to parse environments file",i),this.default}return r?Object.keys(r).filter(i=>i!=="version").map(i=>({name:i,inputs:Object.entries(r[i].inputs).map(([o,s])=>{if(typeof s=="string")return{name:o,value:s,isSecret:!1};const l=n?.[i]?.[o]??"";return{name:o,value:l,isSecret:!0}}),servers:Object.entries(r[i].servers).map(([o,s])=>({apiId:o,value:s.value,variables:Object.entries(s.variables||{}).map(([l,c])=>({name:l,value:c}))})),state:sr.Normal})):this.default}async write(a){const t=await this.localStorageSecretsProvider.get(),r=t?JSON.parse(t):{},n=a.reduce((i,o)=>(o.name&&(i[o.name]={inputs:o.inputs.reduce((s,l)=>(l.isSecret&&r?(r[o.name]||(r[o.name]={}),r[o.name][l.name]=l.value,s[l.name]={provider:"local"}):s[l.name]=l.value,s),{}),servers:o.servers.reduce((s,l)=>(s[l.apiId]={value:l.value,variables:Object.fromEntries(l.variables.map(c=>[c.name,c.value]))},s),{})}),i),{});this.localStorageSecretsProvider.set(JSON.stringify(r)),n&&this.storage.set("replay-environments.yaml",Jp.dump(n))}}class y2t{constructor(a,t,r){this.storage=a,this.filePath=t,this.defaultValue=r}async parse(a){return JSON.parse(a)}stringify(a){return JSON.stringify(a)}async read(){const a=await this.storage.get(this.filePath);return a?await this.parse(a):this.defaultValue}async write(a){return this.storage.set(this.filePath,this.stringify(a))}}const k2t=(e,a)=>({data:e,version:a});class e$ extends y2t{constructor(a,t,r,n){super(a,t,r),this.version=n}migrationMap={};migrate(a){if(!this.migrationMap[a.version])return this.defaultValue;const t=this.migrationMap[a.version](a);return t.version===this.version?t:this.migrate(t)}async parse(a){const t=JSON.parse(a);if(t.version!==this.version){const r=this.migrate(t);return await this.write(r.data),r.data}return t.data}stringify(a){return JSON.stringify(k2t(a,this.version))}}function x2t(e){return{data:{...e.data,tabs:e.data.tabs.map(a=>a.data.type===Ka.Step?{...a,data:{...a.data,draftStep:{...a.data.step,security:a.data.step.security.securities},step:void 0,hasUnsavedChanges:void 0,showUnsavedChangesModal:void 0}}:a)},version:2}}const i2e=2,w2t="tabs.json";class z2t extends e${migrationMap={1:x2t};constructor(a){super(a,w2t,Td(zbe),i2e)}async parse(a){let t=JSON.parse(a);t.version!==i2e&&(t=this.migrate(t));const r=await Promise.all(t.data.tabs.map(async n=>{if(n.data.type===Ka.Step&&n.data.draftStep){const i=n.data.draftStep.requestBody.formData;i["multipart/form-data"]=await o2e(i["multipart/form-data"]),i["application/x-www-form-urlencoded"]=await o2e(i["application/x-www-form-urlencoded"]),n.data.draftStep.requestBody.binary&&n.data.draftStep.requestBody.binary.absolutePath&&(n.data.draftStep.requestBody.binary=await wx(n.data.draftStep.requestBody.binary.absolutePath))}return n}));return{...t.data,tabs:r}}stringify(a){return super.stringify({...a,tabs:a.tabs.map(t=>t.data.type===Ka.Step?{...t,data:{...t.data,response:null}}:t.data.type===Ka.WorkflowRun?{...t,data:{...t.data,result:null}}:t)})}}async function o2e(e){return Promise.all(e.map(async a=>{const t={...a};if(a.files){const r=a.files.map(n=>n.absolutePath).filter(n=>n!==null);t.files=await LSe(r)}return t}))}const S2t=1,C2t=1;class j2t{constructor(a,t){this.project=a,this.convertOperationToReplayValue=t,this.localStorageSecretsProvider=new Xmt(this.project.id),this.systemFilesStorage=this.isTauriApp?new Lbe(this.project.systemFilesDir):new _be(this.project.systemFilesDir),this.userFilesStorage=this.isTauriApp?new Lbe(this.project.userFilesDir):new _be(this.project.userFilesDir);const r=new Zmt;this.historyStorage=new e$(this.systemFilesStorage,"history.json",[],S2t),this.activeEnvironmentIdStorage=new e$(this.systemFilesStorage,"active_environment_id.json",A0,C2t),this.tabsStateStorage=new z2t(this.systemFilesStorage),this.environmentsStorage=new b2t(this.userFilesStorage,this.localStorageSecretsProvider),this.collectionsStorage=new v2t(this.userFilesStorage,this.convertOperationToReplayValue),this.apisStorage=new Ymt(this.isTauriApp?this.userFilesStorage:r)}historyStorage;activeEnvironmentIdStorage;tabsStateStorage;environmentsStorage;collectionsStorage;apisStorage;isTauriApp=Wv();systemFilesStorage;localStorageSecretsProvider;userFilesStorage;async detectProjectFiles(){const a=(await this.userFilesStorage.ls()).filter(i=>/\.(ya?ml|json)$/.test(i)),t=[],r=[],n=new Set;return await Promise.all(a.map(async i=>{const o=await this.userFilesStorage.get(i);if(o)try{const s=Jp.load(o);if(typeof s=="object"&&s!==null)if(typeof s.openapi=="string"){const l=await nn.resolve(await nn.join(this.userFilesStorage.baseDir,i)),c=await Bbe(l,s);t.push({uri:i,type:vu.FS,content:c})}else typeof s.arazzo=="string"&&(r.push({uri:i,type:vu.FS,content:s}),s.sourceDescriptions?.map(async l=>{const c=l.type,u=l.url,d=!c||c==="openapi",p=typeof u=="string"&&Ebe(u);d&&p&&n.add(u)}))}catch(s){console.error(`Error parsing YAML/JSON file ${i}:`,s)}})),{apiFiles:t,collectionFiles:r,apiUrls:n}}async loadApis(a){const t=[];return await Promise.all(Array.from(a).map(async r=>{try{const n=await Bbe(r);t.push({uri:r,type:vu.WEB,content:n})}catch(n){console.error(`Error parsing YAML from ${r}:`,n)}})),t}async read(){const[a,t,r,n]=await Promise.all([this.historyStorage.read(),this.activeEnvironmentIdStorage.read(),this.tabsStateStorage.read(),this.environmentsStorage.read()]),{apiFiles:i,collectionFiles:o,apiUrls:s}=await this.detectProjectFiles(),l=await this.loadApis(s),c=await this.apisStorage.parseMany([...i,...l]),u=await this.collectionsStorage.parseMany(o,c);return{project:this.project,history:a,activeEnvironmentId:t,tabsState:r,environments:n,apis:c,collections:u}}async update(a,t){switch(a.path[0]){case"history":this.historyStorage.write(t.history.get());break;case"activeEnvironmentId":this.activeEnvironmentIdStorage.write(t.activeEnvironmentId.get());break;case"tabsState":this.tabsStateStorage.write(t.tabsState.get());break;case"environments":this.environmentsStorage.write(t.environments.get());break;case"apis":this.isTauriApp&&await this.apisStorage.update(a,t.apis.get());break;case"collections":await this.collectionsStorage.update(a,t.collections.get());break}}}function O2t(e=!1){let a,t=!1;return()=>({id:"RootStoragePlugin",onCreate:()=>({init:r=>async(n,i)=>{if(t||r.path.length>0)return{isInitialized:!1};if(t=!0,!e){a=new j2t(n,i);const o=await a.read();r.merge(o)}return t=!1,{isInitialized:!0}}}),onSet(r,n,i){t||e||a.update(n,i)}})}function A2t({defaultEnvironments:e}={}){return structuredClone({project:{id:"default",userFilesDir:"default",systemFilesDir:"default"},history:[],tabsState:Td(zbe),activeEnvironmentId:A0,environments:e||wbe,collections:[],apis:[],requestController:null,apps:{apps:[],appsLoadingState:gu.Idle},predefinedApiId:null,predefinedEnvironmentNames:new Set,predefinedInputNames:new Set})}const P2t=Wia(A2t(),Zia(Dmt({key:"replay-root-store"}),O2t())),s2e=R.createContext(P2t);function Ft(){const e=R.useContext(s2e);return Gre(e)}function M2t(){return{theme:"light",disableCollectionsTab:!1,oAuth2RedirectURI:null,corsProxyUrl:void 0,mockServer:void 0,certificates:[],isApiBased:!1,generatedEnvironments:[],generatedInputs:[]}}const T2t=M2t(),B2t=R.createContext(T2t);function Id(){const e=R.useContext(B2t);return Gre(e)}function E2t(e,a){const{apps:{apiId:t}}=Ft(),{corsProxyUrl:r,disableCollectionsTab:n,mockServer:i,oAuth2RedirectURI:o,certificates:s,storageKey:l,isApiBased:c}=Id();r.set(e?.corsProxyUrl??_mt),i.set(e?.mockServer),t.set(e?.apiId),o.set(e?.oAuth2RedirectURI),n.set(!!e?.disableCollectionsTab),l.set(e?.storageKey),c.set(!!a),R.useEffect(()=>{s.set(e?.certificates||[])},[e?.certificates])}const l2e=R.createContext({});function zx(){return R.useContext(l2e)||{}}const _2t="0.19.0-next.1",L2t={version:_2t};class R2t{client;_isInitialized=!1;constructor(){this.client=new Bmt}get isInitialized(){return this._isInitialized}init(a){if(this.isInitialized)return;const t=!0,r=a?.tracerName||"desktop",n=a?.enableErrorInstrumentation??r==="desktop",i={serviceName:"replay",serviceVersion:L2t.version,version:"1.0.0",tracerName:r,collectorUrl:a?.collectorUrl||"",isProd:t,enableErrorInstrumentation:n};this.client.init({otel:{...a,...i}}),this._isInitialized=!0}sendEvent(a,t){if(!this.isInitialized){console.warn("Telemetry client not initialized. Call init() first.");return}try{this.client.send(a,t)}catch(r){console.error("Failed to send telemetry event:",r)}}}const a$=new R2t;function Bt(){const{telemetry:e}=zx();return a$.isInitialized||a$.init({tracerName:e?.tracerName,collectorUrl:e?.collectorUrl,enableErrorInstrumentation:e?.enableErrorInstrumentation}),{sendEvent:(a,t)=>{a$.sendEvent(a,t)}}}const Ro=800;function bf(e){"@babel/helpers - typeof";return bf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(a){return typeof a}:function(a){return a&&typeof Symbol=="function"&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},bf(e)}function N2t(e,a){if(bf(e)!="object"||!e)return e;var t=e[Symbol.toPrimitive];if(t!==void 0){var r=t.call(e,a);if(bf(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(a==="string"?String:Number)(e)}function c2e(e){var a=N2t(e,"string");return bf(a)=="symbol"?a:a+""}function Sx(e,a,t){return(a=c2e(a))in e?Object.defineProperty(e,a,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[a]=t,e}function u2e(e,a){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);a&&(r=r.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,r)}return t}function Ya(e){for(var a=1;a<arguments.length;a++){var t=arguments[a]!=null?arguments[a]:{};a%2?u2e(Object(t),!0).forEach(function(r){Sx(e,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):u2e(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))})}return e}function D2t(e){if(Array.isArray(e))return e}function $2t(e,a){var t=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(t!=null){var r,n,i,o,s=[],l=!0,c=!1;try{if(i=(t=t.call(e)).next,a===0){if(Object(t)!==t)return;l=!1}else for(;!(l=(r=i.call(t)).done)&&(s.push(r.value),s.length!==a);l=!0);}catch(u){c=!0,n=u}finally{try{if(!l&&t.return!=null&&(o=t.return(),Object(o)!==o))return}finally{if(c)throw n}}return s}}function t$(e,a){(a==null||a>e.length)&&(a=e.length);for(var t=0,r=Array(a);t<a;t++)r[t]=e[t];return r}function d2e(e,a){if(e){if(typeof e=="string")return t$(e,a);var t={}.toString.call(e).slice(8,-1);return t==="Object"&&e.constructor&&(t=e.constructor.name),t==="Map"||t==="Set"?Array.from(e):t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?t$(e,a):void 0}}function I2t(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
11902
11902
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Kd(e,a){return D2t(e)||$2t(e,a)||d2e(e,a)||I2t()}function K2t(e,a){if(e==null)return{};var t={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(a.indexOf(r)!==-1)continue;t[r]=e[r]}return t}function Vd(e,a){if(e==null)return{};var t,r,n=K2t(e,a);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)t=i[r],a.indexOf(t)===-1&&{}.propertyIsEnumerable.call(e,t)&&(n[t]=e[t])}return n}var V2t=["defaultInputValue","defaultMenuIsOpen","defaultValue","inputValue","menuIsOpen","onChange","onInputChange","onMenuClose","onMenuOpen","value"];function H2t(e){var a=e.defaultInputValue,t=a===void 0?"":a,r=e.defaultMenuIsOpen,n=r===void 0?!1:r,i=e.defaultValue,o=i===void 0?null:i,s=e.inputValue,l=e.menuIsOpen,c=e.onChange,u=e.onInputChange,d=e.onMenuClose,p=e.onMenuOpen,m=e.value,g=Vd(e,V2t),b=R.useState(s!==void 0?s:t),y=Kd(b,2),v=y[0],k=y[1],z=R.useState(l!==void 0?l:n),C=Kd(z,2),w=C[0],S=C[1],O=R.useState(m!==void 0?m:o),A=Kd(O,2),B=A[0],L=A[1],q=R.useCallback(function(ne,me){typeof c=="function"&&c(ne,me),L(ne)},[c]),N=R.useCallback(function(ne,me){var I;typeof u=="function"&&(I=u(ne,me)),k(I!==void 0?I:ne)},[u]),U=R.useCallback(function(){typeof p=="function"&&p(),S(!0)},[p]),D=R.useCallback(function(){typeof d=="function"&&d(),S(!1)},[d]),Y=s!==void 0?s:v,te=l!==void 0?l:w,ue=m!==void 0?m:B;return Ya(Ya({},g),{},{inputValue:Y,menuIsOpen:te,onChange:q,onInputChange:N,onMenuClose:D,onMenuOpen:U,value:ue})}function ot(){return ot=Object.assign?Object.assign.bind():function(e){for(var a=1;a<arguments.length;a++){var t=arguments[a];for(var r in t)({}).hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e},ot.apply(null,arguments)}function F2t(e,a){if(!(e instanceof a))throw new TypeError("Cannot call a class as a function")}function p2e(e,a){for(var t=0;t<a.length;t++){var r=a[t];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,c2e(r.key),r)}}function G2t(e,a,t){return a&&p2e(e.prototype,a),t&&p2e(e,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function r$(e,a){return r$=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,r){return t.__proto__=r,t},r$(e,a)}function q2t(e,a){if(typeof a!="function"&&a!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(a&&a.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),a&&r$(e,a)}function VM(e){return VM=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(a){return a.__proto__||Object.getPrototypeOf(a)},VM(e)}function h2e(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(h2e=function(){return!!e})()}function J2t(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function U2t(e,a){if(a&&(bf(a)=="object"||typeof a=="function"))return a;if(a!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return J2t(e)}function W2t(e){var a=h2e();return function(){var t,r=VM(e);if(a){var n=VM(this).constructor;t=Reflect.construct(r,arguments,n)}else t=r.apply(this,arguments);return U2t(this,t)}}function Z2t(e){if(Array.isArray(e))return t$(e)}function Q2t(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function X2t(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
11903
11903
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function n$(e){return Z2t(e)||Q2t(e)||d2e(e)||X2t()}function Y2t(e){if(e.sheet)return e.sheet;for(var a=0;a<document.styleSheets.length;a++)if(document.styleSheets[a].ownerNode===e)return document.styleSheets[a]}function eCt(e){var a=document.createElement("style");return a.setAttribute("data-emotion",e.key),e.nonce!==void 0&&a.setAttribute("nonce",e.nonce),a.appendChild(document.createTextNode("")),a.setAttribute("data-s",""),a}var aCt=(function(){function e(t){var r=this;this._insertTag=function(n){var i;r.tags.length===0?r.insertionPoint?i=r.insertionPoint.nextSibling:r.prepend?i=r.container.firstChild:i=r.before:i=r.tags[r.tags.length-1].nextSibling,r.container.insertBefore(n,i),r.tags.push(n)},this.isSpeedy=t.speedy===void 0?!0:t.speedy,this.tags=[],this.ctr=0,this.nonce=t.nonce,this.key=t.key,this.container=t.container,this.prepend=t.prepend,this.insertionPoint=t.insertionPoint,this.before=null}var a=e.prototype;return a.hydrate=function(t){t.forEach(this._insertTag)},a.insert=function(t){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(eCt(this));var r=this.tags[this.tags.length-1];if(this.isSpeedy){var n=Y2t(r);try{n.insertRule(t,n.cssRules.length)}catch{}}else r.appendChild(document.createTextNode(t));this.ctr++},a.flush=function(){this.tags.forEach(function(t){return t.parentNode&&t.parentNode.removeChild(t)}),this.tags=[],this.ctr=0},e})(),No="-ms-",HM="-moz-",br="-webkit-",m2e="comm",i$="rule",o$="decl",tCt="@import",f2e="@keyframes",rCt=Math.abs,FM=String.fromCharCode,nCt=Object.assign;function iCt(e,a){return lo(e,0)^45?(((a<<2^lo(e,0))<<2^lo(e,1))<<2^lo(e,2))<<2^lo(e,3):0}function g2e(e){return e.trim()}function oCt(e,a){return(e=a.exec(e))?e[0]:e}function jr(e,a,t){return e.replace(a,t)}function s$(e,a){return e.indexOf(a)}function lo(e,a){return e.charCodeAt(a)|0}function Cx(e,a,t){return e.slice(a,t)}function Lu(e){return e.length}function l$(e){return e.length}function GM(e,a){return a.push(e),e}function sCt(e,a){return e.map(a).join("")}var qM=1,Ab=1,v2e=0,$s=0,gi=0,Pb="";function JM(e,a,t,r,n,i,o){return{value:e,root:a,parent:t,type:r,props:n,children:i,line:qM,column:Ab,length:o,return:""}}function jx(e,a){return nCt(JM("",null,null,"",null,null,0),e,{length:-e.length},a)}function lCt(){return gi}function cCt(){return gi=$s>0?lo(Pb,--$s):0,Ab--,gi===10&&(Ab=1,qM--),gi}function fl(){return gi=$s<v2e?lo(Pb,$s++):0,Ab++,gi===10&&(Ab=1,qM++),gi}function Ru(){return lo(Pb,$s)}function UM(){return $s}function Ox(e,a){return Cx(Pb,e,a)}function Ax(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function b2e(e){return qM=Ab=1,v2e=Lu(Pb=e),$s=0,[]}function y2e(e){return Pb="",e}function WM(e){return g2e(Ox($s-1,c$(e===91?e+2:e===40?e+1:e)))}function uCt(e){for(;(gi=Ru())&&gi<33;)fl();return Ax(e)>2||Ax(gi)>3?"":" "}function dCt(e,a){for(;--a&&fl()&&!(gi<48||gi>102||gi>57&&gi<65||gi>70&&gi<97););return Ox(e,UM()+(a<6&&Ru()==32&&fl()==32))}function c$(e){for(;fl();)switch(gi){case e:return $s;case 34:case 39:e!==34&&e!==39&&c$(gi);break;case 40:e===41&&c$(e);break;case 92:fl();break}return $s}function pCt(e,a){for(;fl()&&e+gi!==57&&!(e+gi===84&&Ru()===47););return"/*"+Ox(a,$s-1)+"*"+FM(e===47?e:fl())}function hCt(e){for(;!Ax(Ru());)fl();return Ox(e,$s)}function mCt(e){return y2e(ZM("",null,null,null,[""],e=b2e(e),0,[0],e))}function ZM(e,a,t,r,n,i,o,s,l){for(var c=0,u=0,d=o,p=0,m=0,g=0,b=1,y=1,v=1,k=0,z="",C=n,w=i,S=r,O=z;y;)switch(g=k,k=fl()){case 40:if(g!=108&&lo(O,d-1)==58){s$(O+=jr(WM(k),"&","&\f"),"&\f")!=-1&&(v=-1);break}case 34:case 39:case 91:O+=WM(k);break;case 9:case 10:case 13:case 32:O+=uCt(g);break;case 92:O+=dCt(UM()-1,7);continue;case 47:switch(Ru()){case 42:case 47:GM(fCt(pCt(fl(),UM()),a,t),l);break;default:O+="/"}break;case 123*b:s[c++]=Lu(O)*v;case 125*b:case 59:case 0:switch(k){case 0:case 125:y=0;case 59+u:m>0&&Lu(O)-d&&GM(m>32?x2e(O+";",r,t,d-1):x2e(jr(O," ","")+";",r,t,d-2),l);break;case 59:O+=";";default:if(GM(S=k2e(O,a,t,c,u,n,s,z,C=[],w=[],d),i),k===123)if(u===0)ZM(O,a,S,S,C,i,d,s,w);else switch(p===99&&lo(O,3)===110?100:p){case 100:case 109:case 115:ZM(e,S,S,r&&GM(k2e(e,S,S,0,0,n,s,z,n,C=[],d),w),n,w,d,s,r?C:w);break;default:ZM(O,S,S,S,[""],w,0,s,w)}}c=u=m=0,b=v=1,z=O="",d=o;break;case 58:d=1+Lu(O),m=g;default:if(b<1){if(k==123)--b;else if(k==125&&b++==0&&cCt()==125)continue}switch(O+=FM(k),k*b){case 38:v=u>0?1:(O+="\f",-1);break;case 44:s[c++]=(Lu(O)-1)*v,v=1;break;case 64:Ru()===45&&(O+=WM(fl())),p=Ru(),u=d=Lu(z=O+=hCt(UM())),k++;break;case 45:g===45&&Lu(O)==2&&(b=0)}}return i}function k2e(e,a,t,r,n,i,o,s,l,c,u){for(var d=n-1,p=n===0?i:[""],m=l$(p),g=0,b=0,y=0;g<r;++g)for(var v=0,k=Cx(e,d+1,d=rCt(b=o[g])),z=e;v<m;++v)(z=g2e(b>0?p[v]+" "+k:jr(k,/&\f/g,p[v])))&&(l[y++]=z);return JM(e,a,t,n===0?i$:s,l,c,u)}function fCt(e,a,t){return JM(e,a,t,m2e,FM(lCt()),Cx(e,2,-2),0)}function x2e(e,a,t,r){return JM(e,a,t,o$,Cx(e,0,r),Cx(e,r+1,-1),r)}function Mb(e,a){for(var t="",r=l$(e),n=0;n<r;n++)t+=a(e[n],n,e,a)||"";return t}function gCt(e,a,t,r){switch(e.type){case tCt:case o$:return e.return=e.return||e.value;case m2e:return"";case f2e:return e.return=e.value+"{"+Mb(e.children,r)+"}";case i$:e.value=e.props.join(",")}return Lu(t=Mb(e.children,r))?e.return=e.value+"{"+t+"}":""}function vCt(e){var a=l$(e);return function(t,r,n,i){for(var o="",s=0;s<a;s++)o+=e[s](t,r,n,i)||"";return o}}function bCt(e){return function(a){a.root||(a=a.return)&&e(a)}}function yCt(e){var a=Object.create(null);return function(t){return a[t]===void 0&&(a[t]=e(t)),a[t]}}var kCt=function(e,a,t){for(var r=0,n=0;r=n,n=Ru(),r===38&&n===12&&(a[t]=1),!Ax(n);)fl();return Ox(e,$s)},xCt=function(e,a){var t=-1,r=44;do switch(Ax(r)){case 0:r===38&&Ru()===12&&(a[t]=1),e[t]+=kCt($s-1,a,t);break;case 2:e[t]+=WM(r);break;case 4:if(r===44){e[++t]=Ru()===58?"&\f":"",a[t]=e[t].length;break}default:e[t]+=FM(r)}while(r=fl());return e},wCt=function(e,a){return y2e(xCt(b2e(e),a))},w2e=new WeakMap,zCt=function(e){if(!(e.type!=="rule"||!e.parent||e.length<1)){for(var a=e.value,t=e.parent,r=e.column===t.column&&e.line===t.line;t.type!=="rule";)if(t=t.parent,!t)return;if(!(e.props.length===1&&a.charCodeAt(0)!==58&&!w2e.get(t))&&!r){w2e.set(e,!0);for(var n=[],i=wCt(a,n),o=t.props,s=0,l=0;s<i.length;s++)for(var c=0;c<o.length;c++,l++)e.props[l]=n[s]?i[s].replace(/&\f/g,o[c]):o[c]+" "+i[s]}}},SCt=function(e){if(e.type==="decl"){var a=e.value;a.charCodeAt(0)===108&&a.charCodeAt(2)===98&&(e.return="",e.value="")}};function z2e(e,a){switch(iCt(e,a)){case 5103:return br+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return br+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return br+e+HM+e+No+e+e;case 6828:case 4268:return br+e+No+e+e;case 6165:return br+e+No+"flex-"+e+e;case 5187:return br+e+jr(e,/(\w+).+(:[^]+)/,br+"box-$1$2"+No+"flex-$1$2")+e;case 5443:return br+e+No+"flex-item-"+jr(e,/flex-|-self/,"")+e;case 4675:return br+e+No+"flex-line-pack"+jr(e,/align-content|flex-|-self/,"")+e;case 5548:return br+e+No+jr(e,"shrink","negative")+e;case 5292:return br+e+No+jr(e,"basis","preferred-size")+e;case 6060:return br+"box-"+jr(e,"-grow","")+br+e+No+jr(e,"grow","positive")+e;case 4554:return br+jr(e,/([^-])(transform)/g,"$1"+br+"$2")+e;case 6187:return jr(jr(jr(e,/(zoom-|grab)/,br+"$1"),/(image-set)/,br+"$1"),e,"")+e;case 5495:case 3959:return jr(e,/(image-set\([^]*)/,br+"$1$`$1");case 4968:return jr(jr(e,/(.+:)(flex-)?(.*)/,br+"box-pack:$3"+No+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+br+e+e;case 4095:case 3583:case 4068:case 2532:return jr(e,/(.+)-inline(.+)/,br+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(Lu(e)-1-a>6)switch(lo(e,a+1)){case 109:if(lo(e,a+4)!==45)break;case 102:return jr(e,/(.+:)(.+)-([^]+)/,"$1"+br+"$2-$3$1"+HM+(lo(e,a+3)==108?"$3":"$2-$3"))+e;case 115:return~s$(e,"stretch")?z2e(jr(e,"stretch","fill-available"),a)+e:e}break;case 4949:if(lo(e,a+1)!==115)break;case 6444:switch(lo(e,Lu(e)-3-(~s$(e,"!important")&&10))){case 107:return jr(e,":",":"+br)+e;case 101:return jr(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+br+(lo(e,14)===45?"inline-":"")+"box$3$1"+br+"$2$3$1"+No+"$2box$3")+e}break;case 5936:switch(lo(e,a+11)){case 114:return br+e+No+jr(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return br+e+No+jr(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return br+e+No+jr(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return br+e+No+e+e}return e}var CCt=function(e,a,t,r){if(e.length>-1&&!e.return)switch(e.type){case o$:e.return=z2e(e.value,e.length);break;case f2e:return Mb([jx(e,{value:jr(e.value,"@","@"+br)})],r);case i$:if(e.length)return sCt(e.props,function(n){switch(oCt(n,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return Mb([jx(e,{props:[jr(n,/:(read-\w+)/,":"+HM+"$1")]})],r);case"::placeholder":return Mb([jx(e,{props:[jr(n,/:(plac\w+)/,":"+br+"input-$1")]}),jx(e,{props:[jr(n,/:(plac\w+)/,":"+HM+"$1")]}),jx(e,{props:[jr(n,/:(plac\w+)/,No+"input-$1")]})],r)}return""})}},jCt=[CCt],OCt=function(e){var a=e.key;if(a==="css"){var t=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(t,function(g){var b=g.getAttribute("data-emotion");b.indexOf(" ")!==-1&&(document.head.appendChild(g),g.setAttribute("data-s",""))})}var r=e.stylisPlugins||jCt,n={},i,o=[];i=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+a+' "]'),function(g){for(var b=g.getAttribute("data-emotion").split(" "),y=1;y<b.length;y++)n[b[y]]=!0;o.push(g)});var s,l=[zCt,SCt];{var c,u=[gCt,bCt(function(g){c.insert(g)})],d=vCt(l.concat(r,u)),p=function(g){return Mb(mCt(g),d)};s=function(g,b,y,v){c=y,p(g?g+"{"+b.styles+"}":b.styles),v&&(m.inserted[b.name]=!0)}}var m={key:a,sheet:new aCt({key:a,container:i,nonce:e.nonce,speedy:e.speedy,prepend:e.prepend,insertionPoint:e.insertionPoint}),nonce:e.nonce,inserted:n,registered:{},insert:s};return m.sheet.hydrate(o),m},ACt=!0;function PCt(e,a,t){var r="";return t.split(" ").forEach(function(n){e[n]!==void 0?a.push(e[n]+";"):r+=n+" "}),r}var S2e=function(e,a,t){var r=e.key+"-"+a.name;(t===!1||ACt===!1)&&e.registered[r]===void 0&&(e.registered[r]=a.styles)},MCt=function(e,a,t){S2e(e,a,t);var r=e.key+"-"+a.name;if(e.inserted[a.name]===void 0){var n=a;do e.insert(a===n?"."+r:"",n,e.sheet,!0),n=n.next;while(n!==void 0)}};function TCt(e){for(var a=0,t,r=0,n=e.length;n>=4;++r,n-=4)t=e.charCodeAt(r)&255|(e.charCodeAt(++r)&255)<<8|(e.charCodeAt(++r)&255)<<16|(e.charCodeAt(++r)&255)<<24,t=(t&65535)*1540483477+((t>>>16)*59797<<16),t^=t>>>24,a=(t&65535)*1540483477+((t>>>16)*59797<<16)^(a&65535)*1540483477+((a>>>16)*59797<<16);switch(n){case 3:a^=(e.charCodeAt(r+2)&255)<<16;case 2:a^=(e.charCodeAt(r+1)&255)<<8;case 1:a^=e.charCodeAt(r)&255,a=(a&65535)*1540483477+((a>>>16)*59797<<16)}return a^=a>>>13,a=(a&65535)*1540483477+((a>>>16)*59797<<16),((a^a>>>15)>>>0).toString(36)}var BCt={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},ECt=/[A-Z]|^ms/g,_Ct=/_EMO_([^_]+?)_([^]*?)_EMO_/g,C2e=function(e){return e.charCodeAt(1)===45},j2e=function(e){return e!=null&&typeof e!="boolean"},u$=yCt(function(e){return C2e(e)?e:e.replace(ECt,"-$&").toLowerCase()}),O2e=function(e,a){switch(e){case"animation":case"animationName":if(typeof a=="string")return a.replace(_Ct,function(t,r,n){return Nu={name:r,styles:n,next:Nu},r})}return BCt[e]!==1&&!C2e(e)&&typeof a=="number"&&a!==0?a+"px":a};function Px(e,a,t){if(t==null)return"";if(t.__emotion_styles!==void 0)return t;switch(typeof t){case"boolean":return"";case"object":{if(t.anim===1)return Nu={name:t.name,styles:t.styles,next:Nu},t.name;if(t.styles!==void 0){var r=t.next;if(r!==void 0)for(;r!==void 0;)Nu={name:r.name,styles:r.styles,next:Nu},r=r.next;var n=t.styles+";";return n}return LCt(e,a,t)}case"function":{if(e!==void 0){var i=Nu,o=t(e);return Nu=i,Px(e,a,o)}break}}return t}function LCt(e,a,t){var r="";if(Array.isArray(t))for(var n=0;n<t.length;n++)r+=Px(e,a,t[n])+";";else for(var i in t){var o=t[i];if(typeof o!="object")j2e(o)&&(r+=u$(i)+":"+O2e(i,o)+";");else if(Array.isArray(o)&&typeof o[0]=="string"&&a==null)for(var s=0;s<o.length;s++)j2e(o[s])&&(r+=u$(i)+":"+O2e(i,o[s])+";");else{var l=Px(e,a,o);switch(i){case"animation":case"animationName":{r+=u$(i)+":"+l+";";break}default:r+=i+"{"+l+"}"}}}return r}var A2e=/label:\s*([^\s;\n{]+)\s*(;|$)/g,Nu,P2e=function(e,a,t){if(e.length===1&&typeof e[0]=="object"&&e[0]!==null&&e[0].styles!==void 0)return e[0];var r=!0,n="";Nu=void 0;var i=e[0];i==null||i.raw===void 0?(r=!1,n+=Px(t,a,i)):n+=i[0];for(var o=1;o<e.length;o++)n+=Px(t,a,e[o]),r&&(n+=i[o]);A2e.lastIndex=0;for(var s="",l;(l=A2e.exec(n))!==null;)s+="-"+l[1];var c=TCt(n)+s;return{name:c,styles:n,next:Nu}},RCt=function(e){return e()},NCt=tm.useInsertionEffect?tm.useInsertionEffect:!1,DCt=NCt||RCt,d$={}.hasOwnProperty,$Ct=R.createContext(typeof HTMLElement<"u"?OCt({key:"css"}):null),ICt=function(e){return R.forwardRef(function(a,t){var r=R.useContext($Ct);return e(a,r,t)})},KCt=R.createContext({}),p$="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",VCt=function(e,a){var t={};for(var r in a)d$.call(a,r)&&(t[r]=a[r]);return t[p$]=e,t},HCt=function(e){var a=e.cache,t=e.serialized,r=e.isStringTag;return S2e(a,t,r),DCt(function(){return MCt(a,t,r)}),null},FCt=ICt(function(e,a,t){var r=e.css;typeof r=="string"&&a.registered[r]!==void 0&&(r=a.registered[r]);var n=e[p$],i=[r],o="";typeof e.className=="string"?o=PCt(a.registered,i,e.className):e.className!=null&&(o=e.className+" ");var s=P2e(i,void 0,R.useContext(KCt));o+=a.key+"-"+s.name;var l={};for(var c in e)d$.call(e,c)&&c!=="css"&&c!==p$&&(l[c]=e[c]);return l.ref=t,l.className=o,R.createElement(R.Fragment,null,R.createElement(HCt,{cache:a,serialized:s,isStringTag:typeof n=="string"}),R.createElement(n,l))}),Qa=function(e,a){var t=arguments;if(a==null||!d$.call(a,"css"))return R.createElement.apply(void 0,t);var r=t.length,n=new Array(r);n[0]=FCt,n[1]=VCt(e,a);for(var i=2;i<r;i++)n[i]=t[i];return R.createElement.apply(null,n)};function h$(){for(var e=arguments.length,a=new Array(e),t=0;t<e;t++)a[t]=arguments[t];return P2e(a)}var GCt=function(){var e=h$.apply(void 0,arguments),a="animation-"+e.name;return{name:a,styles:"@keyframes "+a+"{"+e.styles+"}",anim:1,toString:function(){return"_EMO_"+this.name+"_"+this.styles+"_EMO_"}}};function qCt(e,a){return a||(a=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(a)}}))}const JCt=Math.min,UCt=Math.max,QM=Math.round,XM=Math.floor,YM=e=>({x:e,y:e});function WCt(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}function M2e(e){return B2e(e)?(e.nodeName||"").toLowerCase():"#document"}function Hd(e){var a;return(e==null||(a=e.ownerDocument)==null?void 0:a.defaultView)||window}function T2e(e){var a;return(a=(B2e(e)?e.ownerDocument:e.document)||window.document)==null?void 0:a.documentElement}function B2e(e){return e instanceof Node||e instanceof Hd(e).Node}function ZCt(e){return e instanceof Element||e instanceof Hd(e).Element}function m$(e){return e instanceof HTMLElement||e instanceof Hd(e).HTMLElement}function E2e(e){return typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Hd(e).ShadowRoot}function _2e(e){const{overflow:a,overflowX:t,overflowY:r,display:n}=f$(e);return/auto|scroll|overlay|hidden|clip/.test(a+r+t)&&!["inline","contents"].includes(n)}function QCt(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function XCt(e){return["html","body","#document"].includes(M2e(e))}function f$(e){return Hd(e).getComputedStyle(e)}function YCt(e){if(M2e(e)==="html")return e;const a=e.assignedSlot||e.parentNode||E2e(e)&&e.host||T2e(e);return E2e(a)?a.host:a}function L2e(e){const a=YCt(e);return XCt(a)?e.ownerDocument?e.ownerDocument.body:e.body:m$(a)&&_2e(a)?a:L2e(a)}function e5(e,a,t){var r;a===void 0&&(a=[]),t===void 0&&(t=!0);const n=L2e(e),i=n===((r=e.ownerDocument)==null?void 0:r.body),o=Hd(n);return i?a.concat(o,o.visualViewport||[],_2e(n)?n:[],o.frameElement&&t?e5(o.frameElement):[]):a.concat(n,e5(n,[],t))}function ejt(e){const a=f$(e);let t=parseFloat(a.width)||0,r=parseFloat(a.height)||0;const n=m$(e),i=n?e.offsetWidth:t,o=n?e.offsetHeight:r,s=QM(t)!==i||QM(r)!==o;return s&&(t=i,r=o),{width:t,height:r,$:s}}function g$(e){return ZCt(e)?e:e.contextElement}function R2e(e){const a=g$(e);if(!m$(a))return YM(1);const t=a.getBoundingClientRect(),{width:r,height:n,$:i}=ejt(a);let o=(i?QM(t.width):t.width)/r,s=(i?QM(t.height):t.height)/n;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}const ajt=YM(0);function tjt(e){const a=Hd(e);return!QCt()||!a.visualViewport?ajt:{x:a.visualViewport.offsetLeft,y:a.visualViewport.offsetTop}}function rjt(e,a,t){return!1}function N2e(e,a,t,r){a===void 0&&(a=!1);const n=e.getBoundingClientRect(),i=g$(e);let o=YM(1);a&&(o=R2e(e));const s=rjt()?tjt(i):YM(0);let l=(n.left+s.x)/o.x,c=(n.top+s.y)/o.y,u=n.width/o.x,d=n.height/o.y;if(i){const p=Hd(i),m=r;let g=p.frameElement;for(;g&&r&&m!==p;){const b=R2e(g),y=g.getBoundingClientRect(),v=f$(g),k=y.left+(g.clientLeft+parseFloat(v.paddingLeft))*b.x,z=y.top+(g.clientTop+parseFloat(v.paddingTop))*b.y;l*=b.x,c*=b.y,u*=b.x,d*=b.y,l+=k,c+=z,g=Hd(g).frameElement}}return WCt({width:u,height:d,x:l,y:c})}function njt(e,a){let t=null,r;const n=T2e(e);function i(){clearTimeout(r),t&&t.disconnect(),t=null}function o(s,l){s===void 0&&(s=!1),l===void 0&&(l=1),i();const{left:c,top:u,width:d,height:p}=e.getBoundingClientRect();if(s||a(),!d||!p)return;const m=XM(u),g=XM(n.clientWidth-(c+d)),b=XM(n.clientHeight-(u+p)),y=XM(c),v={rootMargin:-m+"px "+-g+"px "+-b+"px "+-y+"px",threshold:UCt(0,JCt(1,l))||1};let k=!0;function z(C){const w=C[0].intersectionRatio;if(w!==l){if(!k)return o();w?o(!1,w):r=setTimeout(()=>{o(!1,1e-7)},100)}k=!1}try{t=new IntersectionObserver(z,{...v,root:n.ownerDocument})}catch{t=new IntersectionObserver(z,v)}t.observe(e)}return o(!0),i}function ijt(e,a,t,r){r===void 0&&(r={});const{ancestorScroll:n=!0,ancestorResize:i=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,c=g$(e),u=n||i?[...c?e5(c):[],...e5(a)]:[];u.forEach(v=>{n&&v.addEventListener("scroll",t,{passive:!0}),i&&v.addEventListener("resize",t)});const d=c&&s?njt(c,t):null;let p=-1,m=null;o&&(m=new ResizeObserver(v=>{let[k]=v;k&&k.target===c&&m&&(m.unobserve(a),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{m&&m.observe(a)})),t()}),c&&!l&&m.observe(c),m.observe(a));let g,b=l?N2e(e):null;l&&y();function y(){const v=N2e(e);b&&(v.x!==b.x||v.y!==b.y||v.width!==b.width||v.height!==b.height)&&t(),b=v,g=requestAnimationFrame(y)}return t(),()=>{u.forEach(v=>{n&&v.removeEventListener("scroll",t),i&&v.removeEventListener("resize",t)}),d&&d(),m&&m.disconnect(),m=null,l&&cancelAnimationFrame(g)}}var v$=R.useLayoutEffect,ojt=["className","clearValue","cx","getStyles","getClassNames","getValue","hasValue","isMulti","isRtl","options","selectOption","selectProps","setValue","theme"],a5=function(){};function sjt(e,a){return a?a[0]==="-"?e+a:e+"__"+a:e}function ljt(e,a){for(var t=arguments.length,r=new Array(t>2?t-2:0),n=2;n<t;n++)r[n-2]=arguments[n];var i=[].concat(r);if(a&&e)for(var o in a)a.hasOwnProperty(o)&&a[o]&&i.push("".concat(sjt(e,o)));return i.filter(function(s){return s}).map(function(s){return String(s).trim()}).join(" ")}var D2e=function(e){return vjt(e)?e.filter(Boolean):bf(e)==="object"&&e!==null?[e]:[]},$2e=function(e){var a=Vd(e,ojt);return Ya({},a)},Hn=function(e,a,t){var r=e.cx,n=e.getStyles,i=e.getClassNames,o=e.className;return{css:n(a,e),className:r(t??{},i(a,e),o)}};function t5(e){return[document.documentElement,document.body,window].indexOf(e)>-1}function cjt(e){return t5(e)?window.innerHeight:e.clientHeight}function I2e(e){return t5(e)?window.pageYOffset:e.scrollTop}function r5(e,a){if(t5(e)){window.scrollTo(0,a);return}e.scrollTop=a}function ujt(e){var a=getComputedStyle(e),t=a.position==="absolute",r=/(auto|scroll)/;if(a.position==="fixed")return document.documentElement;for(var n=e;n=n.parentElement;)if(a=getComputedStyle(n),!(t&&a.position==="static")&&r.test(a.overflow+a.overflowY+a.overflowX))return n;return document.documentElement}function djt(e,a,t,r){return t*((e=e/r-1)*e*e+1)+a}function n5(e,a){var t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:200,r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:a5,n=I2e(e),i=a-n,o=10,s=0;function l(){s+=o;var c=djt(s,n,i,t);r5(e,c),s<t?window.requestAnimationFrame(l):r(e)}l()}function K2e(e,a){var t=e.getBoundingClientRect(),r=a.getBoundingClientRect(),n=a.offsetHeight/3;r.bottom+n>t.bottom?r5(e,Math.min(a.offsetTop+a.clientHeight-e.offsetHeight+n,e.scrollHeight)):r.top-n<t.top&&r5(e,Math.max(a.offsetTop-n,0))}function pjt(e){var a=e.getBoundingClientRect();return{bottom:a.bottom,height:a.height,left:a.left,right:a.right,top:a.top,width:a.width}}function V2e(){try{return document.createEvent("TouchEvent"),!0}catch{return!1}}function hjt(){try{return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)}catch{return!1}}var H2e=!1,mjt={get passive(){return H2e=!0}},i5=typeof window<"u"?window:{};i5.addEventListener&&i5.removeEventListener&&(i5.addEventListener("p",a5,mjt),i5.removeEventListener("p",a5,!1));var fjt=H2e;function gjt(e){return e!=null}function vjt(e){return Array.isArray(e)}function o5(e,a,t){return e?a:t}var bjt=function(e){for(var a=arguments.length,t=new Array(a>1?a-1:0),r=1;r<a;r++)t[r-1]=arguments[r];var n=Object.entries(e).filter(function(i){var o=Kd(i,1),s=o[0];return!t.includes(s)});return n.reduce(function(i,o){var s=Kd(o,2),l=s[0],c=s[1];return i[l]=c,i},{})},yjt=["children","innerProps"],kjt=["children","innerProps"];function xjt(e){var a=e.maxHeight,t=e.menuEl,r=e.minHeight,n=e.placement,i=e.shouldScroll,o=e.isFixedPosition,s=e.controlHeight,l=ujt(t),c={placement:"bottom",maxHeight:a};if(!t||!t.offsetParent)return c;var u=l.getBoundingClientRect(),d=u.height,p=t.getBoundingClientRect(),m=p.bottom,g=p.height,b=p.top,y=t.offsetParent.getBoundingClientRect(),v=y.top,k=o?window.innerHeight:cjt(l),z=I2e(l),C=parseInt(getComputedStyle(t).marginBottom,10),w=parseInt(getComputedStyle(t).marginTop,10),S=v-w,O=k-b,A=S+z,B=d-z-b,L=m-k+z+C,q=z+b-w,N=160;switch(n){case"auto":case"bottom":if(O>=g)return{placement:"bottom",maxHeight:a};if(B>=g&&!o)return i&&n5(l,L,N),{placement:"bottom",maxHeight:a};if(!o&&B>=r||o&&O>=r){i&&n5(l,L,N);var U=o?O-C:B-C;return{placement:"bottom",maxHeight:U}}if(n==="auto"||o){var D=a,Y=o?S:A;return Y>=r&&(D=Math.min(Y-C-s,a)),{placement:"top",maxHeight:D}}if(n==="bottom")return i&&r5(l,L),{placement:"bottom",maxHeight:a};break;case"top":if(S>=g)return{placement:"top",maxHeight:a};if(A>=g&&!o)return i&&n5(l,q,N),{placement:"top",maxHeight:a};if(!o&&A>=r||o&&S>=r){var te=a;return(!o&&A>=r||o&&S>=r)&&(te=o?S-w:A-w),i&&n5(l,q,N),{placement:"top",maxHeight:te}}return{placement:"bottom",maxHeight:a};default:throw new Error('Invalid placement provided "'.concat(n,'".'))}return c}function wjt(e){var a={bottom:"top",top:"bottom"};return e?a[e]:"bottom"}var F2e=function(e){return e==="auto"?"bottom":e},zjt=function(e,a){var t,r=e.placement,n=e.theme,i=n.borderRadius,o=n.spacing,s=n.colors;return Ya((t={label:"menu"},Sx(t,wjt(r),"100%"),Sx(t,"position","absolute"),Sx(t,"width","100%"),Sx(t,"zIndex",1),t),a?{}:{backgroundColor:s.neutral0,borderRadius:i,boxShadow:"0 0 0 1px hsla(0, 0%, 0%, 0.1), 0 4px 11px hsla(0, 0%, 0%, 0.1)",marginBottom:o.menuGutter,marginTop:o.menuGutter})},G2e=R.createContext(null),Sjt=function(e){var a=e.children,t=e.minMenuHeight,r=e.maxMenuHeight,n=e.menuPlacement,i=e.menuPosition,o=e.menuShouldScrollIntoView,s=e.theme,l=R.useContext(G2e)||{},c=l.setPortalPlacement,u=R.useRef(null),d=R.useState(r),p=Kd(d,2),m=p[0],g=p[1],b=R.useState(null),y=Kd(b,2),v=y[0],k=y[1],z=s.spacing.controlHeight;return v$(function(){var C=u.current;if(C){var w=i==="fixed",S=o&&!w,O=xjt({maxHeight:r,menuEl:C,minHeight:t,placement:n,shouldScroll:S,isFixedPosition:w,controlHeight:z});g(O.maxHeight),k(O.placement),c?.(O.placement)}},[r,n,i,o,t,c,z]),a({ref:u,placerProps:Ya(Ya({},e),{},{placement:v||F2e(n),maxHeight:m})})},Cjt=function(e){var a=e.children,t=e.innerRef,r=e.innerProps;return Qa("div",ot({},Hn(e,"menu",{menu:!0}),{ref:t},r),a)},jjt=Cjt,Ojt=function(e,a){var t=e.maxHeight,r=e.theme.spacing.baseUnit;return Ya({maxHeight:t,overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},a?{}:{paddingBottom:r,paddingTop:r})},Ajt=function(e){var a=e.children,t=e.innerProps,r=e.innerRef,n=e.isMulti;return Qa("div",ot({},Hn(e,"menuList",{"menu-list":!0,"menu-list--is-multi":n}),{ref:r},t),a)},q2e=function(e,a){var t=e.theme,r=t.spacing.baseUnit,n=t.colors;return Ya({textAlign:"center"},a?{}:{color:n.neutral40,padding:"".concat(r*2,"px ").concat(r*3,"px")})},Pjt=q2e,Mjt=q2e,Tjt=function(e){var a=e.children,t=a===void 0?"No options":a,r=e.innerProps,n=Vd(e,yjt);return Qa("div",ot({},Hn(Ya(Ya({},n),{},{children:t,innerProps:r}),"noOptionsMessage",{"menu-notice":!0,"menu-notice--no-options":!0}),r),t)},Bjt=function(e){var a=e.children,t=a===void 0?"Loading...":a,r=e.innerProps,n=Vd(e,kjt);return Qa("div",ot({},Hn(Ya(Ya({},n),{},{children:t,innerProps:r}),"loadingMessage",{"menu-notice":!0,"menu-notice--loading":!0}),r),t)},Ejt=function(e){var a=e.rect,t=e.offset,r=e.position;return{left:a.left,position:r,top:t,width:a.width,zIndex:1}},_jt=function(e){var a=e.appendTo,t=e.children,r=e.controlElement,n=e.innerProps,i=e.menuPlacement,o=e.menuPosition,s=R.useRef(null),l=R.useRef(null),c=R.useState(F2e(i)),u=Kd(c,2),d=u[0],p=u[1],m=R.useMemo(function(){return{setPortalPlacement:p}},[]),g=R.useState(null),b=Kd(g,2),y=b[0],v=b[1],k=R.useCallback(function(){if(r){var S=pjt(r),O=o==="fixed"?0:window.pageYOffset,A=S[d]+O;(A!==y?.offset||S.left!==y?.rect.left||S.width!==y?.rect.width)&&v({offset:A,rect:S})}},[r,o,d,y?.offset,y?.rect.left,y?.rect.width]);v$(function(){k()},[k]);var z=R.useCallback(function(){typeof l.current=="function"&&(l.current(),l.current=null),r&&s.current&&(l.current=ijt(r,s.current,k,{elementResize:"ResizeObserver"in window}))},[r,k]);v$(function(){z()},[z]);var C=R.useCallback(function(S){s.current=S,z()},[z]);if(!a&&o!=="fixed"||!y)return null;var w=Qa("div",ot({ref:C},Hn(Ya(Ya({},e),{},{offset:y.offset,position:o,rect:y.rect}),"menuPortal",{"menu-portal":!0}),n),t);return Qa(G2e.Provider,{value:m},a?Zz.createPortal(w,a):w)},Ljt=function(e){var a=e.isDisabled,t=e.isRtl;return{label:"container",direction:t?"rtl":void 0,pointerEvents:a?"none":void 0,position:"relative"}},Rjt=function(e){var a=e.children,t=e.innerProps,r=e.isDisabled,n=e.isRtl;return Qa("div",ot({},Hn(e,"container",{"--is-disabled":r,"--is-rtl":n}),t),a)},Njt=function(e,a){var t=e.theme.spacing,r=e.isMulti,n=e.hasValue,i=e.selectProps.controlShouldRenderValue;return Ya({alignItems:"center",display:r&&n&&i?"flex":"grid",flex:1,flexWrap:"wrap",WebkitOverflowScrolling:"touch",position:"relative",overflow:"hidden"},a?{}:{padding:"".concat(t.baseUnit/2,"px ").concat(t.baseUnit*2,"px")})},Djt=function(e){var a=e.children,t=e.innerProps,r=e.isMulti,n=e.hasValue;return Qa("div",ot({},Hn(e,"valueContainer",{"value-container":!0,"value-container--is-multi":r,"value-container--has-value":n}),t),a)},$jt=function(){return{alignItems:"center",alignSelf:"stretch",display:"flex",flexShrink:0}},Ijt=function(e){var a=e.children,t=e.innerProps;return Qa("div",ot({},Hn(e,"indicatorsContainer",{indicators:!0}),t),a)},J2e,Kjt=["size"],Vjt=["innerProps","isRtl","size"],Hjt={name:"8mmkcg",styles:"display:inline-block;fill:currentColor;line-height:1;stroke:currentColor;stroke-width:0"},U2e=function(e){var a=e.size,t=Vd(e,Kjt);return Qa("svg",ot({height:a,width:a,viewBox:"0 0 20 20","aria-hidden":"true",focusable:"false",css:Hjt},t))},b$=function(e){return Qa(U2e,ot({size:20},e),Qa("path",{d:"M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z"}))},W2e=function(e){return Qa(U2e,ot({size:20},e),Qa("path",{d:"M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z"}))},Z2e=function(e,a){var t=e.isFocused,r=e.theme,n=r.spacing.baseUnit,i=r.colors;return Ya({label:"indicatorContainer",display:"flex",transition:"color 150ms"},a?{}:{color:t?i.neutral60:i.neutral20,padding:n*2,":hover":{color:t?i.neutral80:i.neutral40}})},Fjt=Z2e,Gjt=function(e){var a=e.children,t=e.innerProps;return Qa("div",ot({},Hn(e,"dropdownIndicator",{indicator:!0,"dropdown-indicator":!0}),t),a||Qa(W2e,null))},qjt=Z2e,Jjt=function(e){var a=e.children,t=e.innerProps;return Qa("div",ot({},Hn(e,"clearIndicator",{indicator:!0,"clear-indicator":!0}),t),a||Qa(b$,null))},Ujt=function(e,a){var t=e.isDisabled,r=e.theme,n=r.spacing.baseUnit,i=r.colors;return Ya({label:"indicatorSeparator",alignSelf:"stretch",width:1},a?{}:{backgroundColor:t?i.neutral10:i.neutral20,marginBottom:n*2,marginTop:n*2})},Wjt=function(e){var a=e.innerProps;return Qa("span",ot({},a,Hn(e,"indicatorSeparator",{"indicator-separator":!0})))},Zjt=GCt(J2e||(J2e=qCt([`
|
|
11904
11904
|
0%, 80%, 100% { opacity: 0; }
|
|
@@ -15799,7 +15799,7 @@ Use the data prop if you want to provide your own handlers.`);if(e.initialData){
|
|
|
15799
15799
|
display: inline-block;
|
|
15800
15800
|
color: var(--text-color-secondary);
|
|
15801
15801
|
margin-left: var(--spacing-xs);
|
|
15802
|
-
`;function y$t(e){const a=e||"default";return{id:nv(N2(a)),systemFilesDir:um.join("/replay",a),userFilesDir:um.join("/projects",a)}}async function k$t(e){if(!e)throw new Error("Tauri project: userFilesDir is required");const a=nv(N2(e)),t=await $mt(),r=await P0(t,"replay",a);return{id:a,systemFilesDir:r,userFilesDir:e}}function yK(e,a){const t=`apis/${e.info.title}`.replace(/\s+/g,"-").toLowerCase(),r=s=>`${s}.yaml`,n=s=>a.some(l=>l.id===r(s));if(!n(t))return r(t);let i=1,o=`${t}-${i}`;for(;n(o);)i++,o=`${t}-${i}`;return r(o)}function x$t(e,a){return e.find(t=>t.name===a)}function w$t(e,a,t,r,n){const{servers:i,parameters:o}=a,s=o.filter(g=>g.in==="path"),l=z$t(a),c=n;let u=[...i];n?.position==="first"?u.unshift(c):n?.position==="last"?u.push(c):n?.position==="replace"&&(u=[c]);const d=new Set,p=s.map(g=>{const b=g.example?String(g.example):"";return d.add(g.name),{name:g.name,value:b,isSecret:!1}}),m=g=>l.map(b=>{const y=a.security?.flat().find(k=>{const z=k.id;return b.name.startsWith(z)});let v="";if(y){const k=y.serverValues?.[g];k&&(k["x-defaultUsername"]&&b.name.endsWith(tt.Username)?v=k["x-defaultUsername"]:k["x-defaultPassword"]&&b.name.endsWith(tt.Password)?v=k["x-defaultPassword"]:k["x-defaultClientId"]&&b.name.endsWith(tt.ClientId)?v=k["x-defaultClientId"]:k["x-defaultClientSecret"]&&b.name.endsWith(tt.ClientSecret)?v=k["x-defaultClientSecret"]:k["x-defaultAccessToken"]&&(v=k["x-defaultAccessToken"])),v||(y["x-defaultUsername"]&&b.name.endsWith(tt.Username)?v=y["x-defaultUsername"]:y["x-defaultPassword"]&&b.name.endsWith(tt.Password)?v=y["x-defaultPassword"]:y["x-defaultClientId"]&&b.name.endsWith(tt.ClientId)?v=y["x-defaultClientId"]:y["x-defaultClientSecret"]&&b.name.endsWith(tt.ClientSecret)?v=y["x-defaultClientSecret"]:y["x-defaultAccessToken"]&&(v=y["x-defaultAccessToken"]))}return d.add(b.name),{name:b.name,value:b.value||v||"",isSecret:b.isSecret}});return{generatedInputs:d,environments:j$t(u).map(g=>{const b=g.name||g.description||g.url,y=Object.entries(g.variables||{}).map(([C,w])=>({name:C,value:w.default||""})),v=x$t(t,b)?.inputs.filter(C=>C.value)||[],k=m(g.url),z=C$t(S$t(v,p,k),r?.[b]);return{name:b,inputs:z,servers:[{apiId:e,value:g.url,variables:y}],state:sr.Normal}})}}function z$t(e){const a=[]
|
|
15802
|
+
`;function y$t(e){const a=e||"default";return{id:nv(N2(a)),systemFilesDir:um.join("/replay",a),userFilesDir:um.join("/projects",a)}}async function k$t(e){if(!e)throw new Error("Tauri project: userFilesDir is required");const a=nv(N2(e)),t=await $mt(),r=await P0(t,"replay",a);return{id:a,systemFilesDir:r,userFilesDir:e}}function yK(e,a){const t=`apis/${e.info.title}`.replace(/\s+/g,"-").toLowerCase(),r=s=>`${s}.yaml`,n=s=>a.some(l=>l.id===r(s));if(!n(t))return r(t);let i=1,o=`${t}-${i}`;for(;n(o);)i++,o=`${t}-${i}`;return r(o)}function x$t(e,a){return e.find(t=>t.name===a)}function w$t(e,a,t,r,n){const{servers:i,parameters:o}=a,s=o.filter(g=>g.in==="path"),l=z$t(a),c=n;let u=[...i];n?.position==="first"?u.unshift(c):n?.position==="last"?u.push(c):n?.position==="replace"&&(u=[c]);const d=new Set,p=s.map(g=>{const b=g.example?String(g.example):"";return d.add(g.name),{name:g.name,value:b,isSecret:!1}}),m=g=>l.map(b=>{const y=a.security?.flat().find(k=>{const z=k.id;return b.name.startsWith(z)});let v="";if(y){const k=y.serverValues?.[g];k&&(k["x-defaultUsername"]&&b.name.endsWith(tt.Username)?v=k["x-defaultUsername"]:k["x-defaultPassword"]&&b.name.endsWith(tt.Password)?v=k["x-defaultPassword"]:k["x-defaultClientId"]&&b.name.endsWith(tt.ClientId)?v=k["x-defaultClientId"]:k["x-defaultClientSecret"]&&b.name.endsWith(tt.ClientSecret)?v=k["x-defaultClientSecret"]:k["x-defaultAccessToken"]&&(v=k["x-defaultAccessToken"])),v||(y["x-defaultUsername"]&&b.name.endsWith(tt.Username)?v=y["x-defaultUsername"]:y["x-defaultPassword"]&&b.name.endsWith(tt.Password)?v=y["x-defaultPassword"]:y["x-defaultClientId"]&&b.name.endsWith(tt.ClientId)?v=y["x-defaultClientId"]:y["x-defaultClientSecret"]&&b.name.endsWith(tt.ClientSecret)?v=y["x-defaultClientSecret"]:y["x-defaultAccessToken"]&&(v=y["x-defaultAccessToken"]))}return d.add(b.name),{name:b.name,value:b.value||v||"",isSecret:b.isSecret}});return{generatedInputs:d,environments:j$t(u).map(g=>{const b=g.name||g.description||g.url,y=Object.entries(g.variables||{}).map(([C,w])=>({name:C,value:w.default||""})),v=x$t(t,b)?.inputs.filter(C=>C.value)||[],k=m(g.url),z=C$t(S$t(v,p,k),r?.[b]);return{name:b,inputs:z,servers:[{apiId:e,value:g.url,variables:y}],state:sr.Normal}})}}function z$t(e){const a=[];return(e.security?.flat()||[]).forEach(t=>{const r=IM(t),n=t.id;(r===qe.BasicAuth||r===qe.DigestAuth)&&(a.push(Kc(n+tt.Username,!1)),a.push(Kc(n+tt.Password))),r===qe.JWT&&a.push(Kc(n+tt.JWTToken)),r===qe.APIKey&&a.push(Kc(n+tt.APIKey)),r===qe.OAuth2&&(a.push(Kc(n+tt.Token)),YD(t).forEach(i=>{a.push(Kc(n+tt.ClientId)),[We.Implicit,We.ClientCredentialsWithJwtAssertion].includes(i)||a.push(Kc(n+tt.ClientSecret)),i===We.ClientCredentialsWithJwtAssertion&&a.push(Kc(n+tt.ClientAssertion))})),r===qe.OpenIDConnect&&(a.push(Kc(n+tt.Token)),a.push(Kc(n+tt.ClientId)),a.push(Kc(n+tt.ClientSecret)))}),a}function Kc(e,a=!0){return{name:e,value:"",isSecret:a}}function S$t(...e){const a=new Map;for(const t of e)for(const r of t){const n=a.get(r.name);a.set(r.name,{name:r.name,value:r.value||n?.value||"",isSecret:r.isSecret||n?.isSecret||!1})}return Array.from(a.values())}function C$t(e,a){return a?e.map(t=>{const r=a[t.name];return r!==void 0?{...t,value:r}:t}):e}function j$t(e){const a=Jmt(pk?window.location.href:globalThis.SSR_HOSTNAME||"");e.length===0&&(e=[{url:"/"}]);function t(r){return Umt(a,r)}return e.map(r=>({...r,url:t(r.url),description:r.description||""}))}function QMe(e,a,t){if(!e||!e.paths||Object.keys(e.paths).length===0)return{operations:null,error:0};const{operations:r}=O$t(e,a,t);return{operations:r}}function O$t(e,a,t){const r=[];for(const[n,i]of Object.entries(e.paths))for(const[o,s]of Object.entries(i))o!=="parameters"&&o!=="servers"&&o!=="description"&&o!=="summary"&&(s.tags&&s.tags.length>0?s.tags:["Untagged"]).forEach(l=>{const{operation:c}=A$t(n,o,e,l,a,t);c&&r.push(c)});return{operations:r}}function A$t(e,a,t,r,n,i){if(!i)return{operation:null};const o=i(e,a,t);if(!o)return{operation:null};const s=`${t.info.title}/${r}/${o.name}`;return{operation:NSt(o,n,s)}}const XMe=(e,a,t)=>e.find(r=>{if(a&&r.operationId===a)return!0;if(t&&r.apiPath){const{path:n,method:i}=NSe({operationPath:t,parsedSourceDescriptions:[]});return r.apiPath.path===n&&r.apiPath.method===i}return!1}),P$t=({children:e,settings:a,api:t,activeOperationId:r,activeOperationPointer:n})=>{const i=R.useContext(s2e),o=R.useMemo(async()=>{const s=Wv()?await k$t(a.storageKey):y$t(a.storageKey),{isInitialized:l}=await i.init(s,a.convertOperationToReplayValue);if(!l)return;if(!t){i.environments.length===0&&i.environments.set(wbe);return}const c=yK(t,[]),{operations:u}=QMe(t,c,a.convertOperationToReplayValue);if(!u?.length||!u[0].collectionPath?.split("/")?.[0]||(i.apis.set([{id:c,srcType:vu.FS,...t}]),i.predefinedApiId.set(c),!r&&!n))return;const d=XMe(u,r,n),{path:p,method:m}=d?.apiPath||{};if(!d||!p||!m)return;const g=a.convertOperationToReplayValue?.(p,m,t);g&&YMe(i,c,g,a),T$t(i,{apiId:c,path:p,method:m,operationId:d.operationId},g)},[a.storageKey]);return R.useEffect(()=>{if(!t||!a.convertOperationToReplayValue)return;const s=yK(t,[]),{operations:l}=QMe(t,s,a.convertOperationToReplayValue);if(!l?.length)return;const c=XMe(l,r,n),{path:u,method:d}=c?.apiPath||{};if(!c||!u||!d)return;const p=a.convertOperationToReplayValue(u,d,t);p&&YMe(i,s,p,a)},[a.convertOperationToReplayValue,a.predefinedEnvValues,a.mockServer,a.allowedEnvironments,a.selectedEnvironment,t,r,n]),h.jsx(R.Suspense,{fallback:h.jsx(g$t,{projectPath:a.storageKey}),children:h.jsx(M$t,{initStore:o,settings:a,api:t,children:e})})};function M$t({initStore:e,children:a,settings:t,api:r}){return R.use(e),E2t(t,r),h.jsx(Ba.Fragment,{children:a},t.storageKey)}const YMe=(e,a,t,r)=>{const n=e.environments.get({noproxy:!0}),{environments:i,generatedInputs:o}=w$t(a,t,n,r.predefinedEnvValues,r.mockServer);e.predefinedInputNames.set(o);let s,l,c;if(r.allowedEnvironments?.length){const u=i.filter(d=>r.allowedEnvironments?.includes(d.name));s=new Set(u.map(d=>d.name)),l=u,c=l.find(d=>d.name===r.selectedEnvironment)?.name||l[0]?.name||""}else{s=new Set(i.map(d=>d.name)),l=[...i,...n.filter(d=>!s.has(d.name))];const u=e.activeEnvironmentId.get();c=l.find(d=>d.name===u)?.name||l.find(d=>d.name===r.selectedEnvironment)?.name||l[0]?.name||""}e.predefinedEnvironmentNames.set(s),FL(l,e.environments.get({noproxy:!0}))||e.environments.set(l),e.activeEnvironmentId.set(c)},T$t=(e,a,t)=>{const r=e.tabsState.tabs.get().findIndex(({data:n})=>fi(n,Ka.Step)&&n.draftStep?.operation?.apiId===a.apiId&&n.draftStep?.operation?.path===a.path&&n.draftStep?.operation?.method===a.method);if(r!==-1)e.tabsState.activeTabIdx.set(r);else{const n=eje(a,t);e.tabsState.tabs.merge([n]),e.tabsState.activeTabIdx.set(e.tabsState.tabs.length-1)}},e5e=R.createContext({renderProjectSelect:()=>null});function B$t(){return R.useContext(e5e)}function E$t(){const{renderProjectSelect:e}=B$t(),{layout:a}=zx(),{apis:t}=Ft(),r=t[0]?.get()?.info?.title,n=!e&&a==="overlay"&&r;return h.jsxs(_$t,{children:[e&&h.jsx(a5e,{children:h.jsx(e,{})}),n&&h.jsx(a5e,{children:h.jsx(L$t,{children:r})}),h.jsx(R$t,{children:h.jsx(ZMe,{})})]})}const _$t=J.div`
|
|
15803
15803
|
display: flex;
|
|
15804
15804
|
padding: 0 var(--spacing-xs);
|
|
15805
15805
|
height: 40px;
|