@redocly/cli 0.0.0-snapshot.1790672883 → 0.0.0-snapshot.1790673161
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.
- package/THIRD_PARTY_NOTICES +31 -15
- package/lib/chunks/{BWKTMG6N.js → 3P2RGSZJ.js} +1 -1
- package/lib/chunks/{TL5AG5Q3.js → 3U2KNDZX.js} +1 -1
- package/lib/chunks/{3BFCKCGG.js → 4BGSRF5B.js} +1 -1
- package/lib/chunks/{XCTRKJWL.js → 4X5R7U43.js} +1 -1
- package/lib/chunks/{4VYQ646D.js → 55D5R2CI.js} +1 -1
- package/lib/chunks/{I5T5SZXU.js → 5AL5JLUI.js} +1 -1
- package/lib/chunks/{U44YWMRQ.js → 5AUAYKG6.js} +1 -1
- package/lib/chunks/{22AHGP7L.js → 5ZUHMZG3.js} +2 -2
- package/lib/chunks/{HULFOBOK.js → 6TPSUBEU.js} +1 -1
- package/lib/chunks/{EUJBECWP.js → 7BMFS4Z5.js} +1 -1
- package/lib/chunks/{7OOQASHF.js → 7IAPU2U2.js} +1 -1
- package/lib/chunks/{UF2ZCH7W.js → 7IULUVWX.js} +1 -1
- package/lib/chunks/{F4XXTYFB.js → AFPC3KID.js} +2 -2
- package/lib/chunks/{OSHI4BAC.js → AMJOKSAL.js} +1 -1
- package/lib/chunks/{O5DQLJQ5.js → DENZJW7D.js} +4 -4
- package/lib/chunks/{XR2WMYAN.js → DG5WCCVN.js} +1 -1
- package/lib/chunks/{QIBQIQ27.js → FY3KXOKN.js} +1 -1
- package/lib/chunks/{YTVGAPYR.js → G7C4T7FQ.js} +1 -1
- package/lib/chunks/{MG2X42RK.js → GHERRC6V.js} +1 -1
- package/lib/chunks/{PR36WEAZ.js → GIOCLCJ6.js} +3 -3
- package/lib/chunks/{4ZWJVLWW.js → GSOISRWG.js} +2 -2
- package/lib/chunks/{JZ6YVUBT.js → HMYPQDEJ.js} +1 -1
- package/lib/chunks/{KCWABL72.js → HSCVR6IQ.js} +1 -1
- package/lib/chunks/HXPNR55A.js +193 -0
- package/lib/chunks/{XLM64AB7.js → HYKAUCSR.js} +1 -1
- package/lib/chunks/{PDSRLLKY.js → J7XSOBV7.js} +1 -1
- package/lib/chunks/{MMJMGNQM.js → JNIZCD5S.js} +1 -1
- package/lib/chunks/{2OWK6ORZ.js → JQWZYX6X.js} +1 -1
- package/lib/chunks/{X5NVA5DC.js → KDBUTZUT.js} +1 -1
- package/lib/chunks/{GOKRPW2M.js → KMNJCAYW.js} +1 -1
- package/lib/chunks/{6GWYWLQE.js → KPFGQW4F.js} +1 -1
- package/lib/chunks/{PKEUTIYU.js → KURCC526.js} +1 -1
- package/lib/chunks/LRUXN6H5.js +59 -0
- package/lib/chunks/{J3U3Z5N3.js → LWSTVQJL.js} +1 -1
- package/lib/chunks/{YLD7D5C7.js → LZ2TTGJR.js} +1 -1
- package/lib/chunks/{MRDJDEVA.js → N3TSMQIC.js} +1 -1
- package/lib/chunks/{CAZFFH45.js → N5FQZNDC.js} +1 -1
- package/lib/chunks/NABUP3PL.js +47 -0
- package/lib/chunks/{2BRAZG75.js → NH4WYS7F.js} +1 -1
- package/lib/chunks/NWGQGGMR.js +13 -0
- package/lib/chunks/{OXPS6FDT.js → PBOXQ3TE.js} +1 -1
- package/lib/chunks/{QVJ6QGFE.js → PHZLEQDI.js} +1 -1
- package/lib/chunks/{TN7PLSFN.js → QSWITRBO.js} +1 -1
- package/lib/chunks/{BQW7Y5Y7.js → S4WOFWA5.js} +1 -1
- package/lib/chunks/{PCCMXQGI.js → S7GXYJSH.js} +1 -1
- package/lib/chunks/{AT2MHYQK.js → UFJGOTOA.js} +1 -1
- package/lib/chunks/{G3UEJKRT.js → UV4CQHAM.js} +1 -1
- package/lib/chunks/{NXVYN2E5.js → VH6GY6BQ.js} +1 -1
- package/lib/chunks/{H5PN7QGA.js → VPKT5TZ6.js} +1 -1
- package/lib/chunks/{OSA7YQHD.js → Y2HPLCNE.js} +1 -1
- package/lib/chunks/{B7XEMMA4.js → YTXW7XO6.js} +1 -1
- package/lib/chunks/{X2M5IPYL.js → Z2G5S6QY.js} +1 -1
- package/lib/chunks/{4ZAAZ6QR.js → Z5IC4SW3.js} +1 -1
- package/lib/chunks/{ZSWX5KJK.js → ZZI3UHKX.js} +1 -1
- package/lib/index.js +293 -78
- package/package.json +1 -1
- package/lib/chunks/4PTNG4EI.js +0 -7
- package/lib/chunks/64G5RPLP.js +0 -7
- package/lib/chunks/77PKSWSF.js +0 -9
- package/lib/chunks/A47HIKFU.js +0 -7
- package/lib/chunks/ARPKVVOJ.js +0 -34
- package/lib/chunks/B6KVG6PQ.js +0 -20
- package/lib/chunks/BAZGY3WE.js +0 -18
- package/lib/chunks/BXI4SF2U.js +0 -59
- package/lib/chunks/CQR4MJXN.js +0 -29
- package/lib/chunks/EANNKQPL.js +0 -7
- package/lib/chunks/EJUXRX56.js +0 -14
- package/lib/chunks/GHSNC2OX.js +0 -9
- package/lib/chunks/HBUZKWXC.js +0 -7
- package/lib/chunks/LL4VRQ5E.js +0 -10
- package/lib/chunks/NAGHMMUU.js +0 -11
- package/lib/chunks/NWFPGEJX.js +0 -10
- package/lib/chunks/O5ENP6LH.js +0 -119
- package/lib/chunks/PVM5DFVM.js +0 -7
- package/lib/chunks/Q6P3WGF6.js +0 -11
- package/lib/chunks/QKUZCZRR.js +0 -45
- package/lib/chunks/SEBRIEPP.js +0 -14
- package/lib/chunks/SHZKWD7H.js +0 -193
- package/lib/chunks/SJHPKWSD.js +0 -9
- package/lib/chunks/U5DIFWGH.js +0 -7
- package/lib/chunks/UYLRQ7H5.js +0 -13
package/THIRD_PARTY_NOTICES
CHANGED
|
@@ -623,21 +623,19 @@ Packages:
|
|
|
623
623
|
zod-to-json-schema@3.25.2 — Copyright (c) 2020, Stefan Terdell
|
|
624
624
|
|
|
625
625
|
License text:
|
|
626
|
-
|
|
626
|
+
Copyright Eemeli Aro <eemeli@gmail.com>
|
|
627
627
|
|
|
628
|
-
|
|
628
|
+
Permission to use, copy, modify, and/or distribute this software for any purpose
|
|
629
|
+
with or without fee is hereby granted, provided that the above copyright notice
|
|
630
|
+
and this permission notice appear in all copies.
|
|
629
631
|
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
|
638
|
-
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
|
639
|
-
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
|
|
640
|
-
IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
632
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
633
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
|
634
|
+
FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
635
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
|
|
636
|
+
OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
|
|
637
|
+
TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
|
|
638
|
+
THIS SOFTWARE.
|
|
641
639
|
|
|
642
640
|
============================================================
|
|
643
641
|
MIT
|
|
@@ -725,14 +723,32 @@ Packages:
|
|
|
725
723
|
supports-color@7.2.0
|
|
726
724
|
ulid@2.4.0 — Copyright (c) 2017 Alizain Feerasta
|
|
727
725
|
ulid@3.0.2 — Copyright (c) 2017 Alizain Feerasta
|
|
728
|
-
undici@6.
|
|
726
|
+
undici@6.29.0 — Copyright (c) Matteo Collina and Undici contributors
|
|
729
727
|
uri-js-replace@1.0.1
|
|
730
728
|
use-sync-external-store@1.6.0 — Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
731
729
|
yargs@17.0.1 — Copyright 2010 James Halliday (mail@substack.net); Modified work Copyright 2014 Contributors (ben@npmjs.com)
|
|
732
730
|
zod@4.4.3 — Copyright (c) 2025 Colin McDonnell
|
|
733
731
|
|
|
734
732
|
License text:
|
|
735
|
-
(
|
|
733
|
+
Copyright (C) 2013 by Oliver Nightingale
|
|
734
|
+
|
|
735
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
736
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
737
|
+
in the Software without restriction, including without limitation the rights
|
|
738
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
739
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
740
|
+
furnished to do so, subject to the following conditions:
|
|
741
|
+
|
|
742
|
+
The above copyright notice and this permission notice shall be included in
|
|
743
|
+
all copies or substantial portions of the Software.
|
|
744
|
+
|
|
745
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
746
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
747
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
748
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
749
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
750
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
751
|
+
THE SOFTWARE.
|
|
736
752
|
|
|
737
753
|
============================================================
|
|
738
754
|
unknown
|
|
@@ -4,7 +4,7 @@ import { dirname as __pathDirname } from 'node:path';
|
|
|
4
4
|
const require = __createRequire(import.meta.url);
|
|
5
5
|
var __filename = __fileURLToPath(import.meta.url);
|
|
6
6
|
var __dirname = __pathDirname(__filename);
|
|
7
|
-
import{b as x,c as P,d as c}from"./
|
|
7
|
+
import{b as x,c as P,d as c}from"./5ZUHMZG3.js";import{e as y,g as b,m as w,n as $}from"./QSWITRBO.js";import"./Y2HPLCNE.js";import{g as l}from"./NABUP3PL.js";import"./LRUXN6H5.js";import{P as g,X as n,l as p}from"./HXPNR55A.js";import"./NEWT5A6S.js";import"./RFWIIJFG.js";async function C({argv:t,config:o,version:h}){let f=performance.now(),A=Date.now(),{organization:s,project:m,"mount-path":F,verbose:I}=t,d=t.domain||b(),e,r,u=[];try{let i=y();if(e=$(t.files,(a,S)=>{n.warn(`File ${a} is overwritten by ${S}
|
|
8
8
|
`)}),!e.length)return l("push",f,"No files to upload");r=(await w({domain:d,apiKey:i,organization:s,project:m,mountPath:F,files:e,defaultBranch:t["default-branch"],commit:{message:t.message,branchName:t.branch,sha:t["commit-sha"],url:t["commit-url"],createdAt:t["created-at"],namespace:t.namespace,repository:t.repository,author:T(t.author)},version:h,replace:t.replace,onUploadStart:a=>{n.info(`Uploading to ${a.mountPath} ${e.length} ${p("file",e.length)}:
|
|
9
9
|
`)},onSunsetWarning:a=>u.push(a)})).pushId}catch(i){c("push",u),P("\u2717 File upload failed.",i)}for(let i of e)n.info(g(`\u2713 ${i.name}
|
|
10
10
|
`));return n.info(`
|
|
@@ -8,4 +8,4 @@ import{a as f,m as u}from"./UW4UC7ZI.js";function m(e,t){let n=t??{},i=e.specNam
|
|
|
8
8
|
`))e.line(c);e.line("```"),e.blank()}let a=[...t.pathParams,...t.queryParams,...t.headerParams];a.length>0&&T(e,a),t.requestBody!==void 0&&e.line(`Body: \`${t.requestBody.contentType}\`${t.requestBody.required?", required":", optional"}, of type ${o(t.requestBody.schema)}.`);let r=t.successResponses[0];e.line(r===void 0?"Returns no content.":`Returns \`${r.contentType}\`, of type ${o(r.schema)}.`),(n.paginated!==void 0?n.paginated.has(t.name):m(t,n.pagination)!==void 0)&&e.line("This operation is paginated, so the SDK gives it page and item iterators."),t.successResponses.some(c=>c.contentType==="text/event-stream")&&e.line("This operation streams server-sent events, so the SDK iterates the events."),P(t)&&e.line("This operation returns binary content."),e.blank()}function v(e,t){let n=new f;if(t.frontmatter&&(n.line("---"),n.line(`title: ${t.title}`),n.line("---"),n.blank()),n.line(`# ${t.title}`),n.blank(),n.line(`Generated reference for the ${t.language.label} SDK, produced from the API description by \`redocly generate-client\`.`),n.line("Re-run generation to update it \u2014 this file is not hand-edited."),n.blank(),n.line(t.language.requires),n.blank(),n.line("## Authentication"),n.blank(),e.securitySchemes.length===0)n.line("The description declares no security schemes.");else{n.line("The description declares these schemes, which you pass to the client:"),n.blank(),n.line("| Scheme | Kind | Sent as |"),n.line("| ------ | ---- | ------- |");for(let r of e.securitySchemes){let s=r.kind==="bearer"?"`Authorization: Bearer <token>`":r.kind==="basic"?"`Authorization: Basic <base64>`":r.kind==="apiKeyHeader"?`the \`${r.headerName}\` header`:r.kind==="apiKeyQuery"?`the \`${r.paramName}\` query parameter`:`the \`${r.cookieName}\` cookie`;n.line(`| \`${r.key}\` | ${r.kind} | ${s} |`)}}n.blank();let i=e.services.flatMap(r=>r.operations),a=[...new Set(i.map(r=>r.tags[0]))];for(let r of a){n.line(r===void 0?"## Operations":`## ${r}`),n.blank();for(let s of i.filter(c=>c.tags[0]===r))C(n,s,t)}return n.toString().replace(/\n{3,}/g,`
|
|
9
9
|
|
|
10
10
|
`).trimEnd()+`
|
|
11
|
-
`}var ee=["Printer","casing","identifierFor","uniqueIdentifiers","RESERVED_WORDS","flattenAllOf","deref","discriminatorCases","jsonSuccessSchema","sseResponse","isMultipartBody","isBinaryContentType","serverUrlParts","securityRequirements","paginationItemSchema","isNullable","unwrapNullable","enumValues","docText","headerCoerceType","schemaAtPointer","paginationRuleFor","renderReferencePage","NotSupportedError"];function E(e){return e}function w(e){return e.toLowerCase().split(/[^a-z0-9]+/).filter(Boolean).join("-")}function A(e){return e.replace(/[^A-Za-z0-9]+/g,"_").replace(/([a-z0-9])([A-Z])/g,"$1_$2").toUpperCase()}function q(e,t){let n={...e};for(let[i,a]of Object.entries(t))a!==void 0&&(n[i]=a);return n}function de(e){return e}async function ke(e){return(await import("./
|
|
11
|
+
`}var ee=["Printer","casing","identifierFor","uniqueIdentifiers","RESERVED_WORDS","flattenAllOf","deref","discriminatorCases","jsonSuccessSchema","sseResponse","isMultipartBody","isBinaryContentType","serverUrlParts","securityRequirements","paginationItemSchema","isNullable","unwrapNullable","enumValues","docText","headerCoerceType","schemaAtPointer","paginationRuleFor","renderReferencePage","NotSupportedError"];function E(e){return e}function w(e){return e.toLowerCase().split(/[^a-z0-9]+/).filter(Boolean).join("-")}function A(e){return e.replace(/[^A-Za-z0-9]+/g,"_").replace(/([a-z0-9])([A-Z])/g,"$1_$2").toUpperCase()}function q(e,t){let n={...e};for(let[i,a]of Object.entries(t))a!==void 0&&(n[i]=a);return n}function de(e){return e}async function ke(e){return(await import("./5AL5JLUI.js")).generateClient(e)}export{m as a,h as b,x as c,k as d,d as e,b as f,S as g,$ as h,v as i,ee as j,E as k,w as l,A as m,q as n,de as o,ke as p};
|
|
@@ -4,4 +4,4 @@ import { dirname as __pathDirname } from 'node:path';
|
|
|
4
4
|
const require = __createRequire(import.meta.url);
|
|
5
5
|
var __filename = __fileURLToPath(import.meta.url);
|
|
6
6
|
var __dirname = __pathDirname(__filename);
|
|
7
|
-
import{a}from"./
|
|
7
|
+
import{a}from"./4X5R7U43.js";import"./HMYPQDEJ.js";import"./J7XSOBV7.js";import"./3U2KNDZX.js";import"./GSOISRWG.js";import"./WZXA5XPB.js";import"./HXPNR55A.js";import"./NEWT5A6S.js";import"./LD5MEXEL.js";import"./UW4UC7ZI.js";import"./RFWIIJFG.js";export{a as swrGenerator};
|
|
@@ -4,7 +4,7 @@ import { dirname as __pathDirname } from 'node:path';
|
|
|
4
4
|
const require = __createRequire(import.meta.url);
|
|
5
5
|
var __filename = __fileURLToPath(import.meta.url);
|
|
6
6
|
var __dirname = __pathDirname(__filename);
|
|
7
|
-
import{a as $,b as a,c,d as i,e as m,f}from"./
|
|
7
|
+
import{a as $,b as a,c,d as i,e as m,f}from"./HMYPQDEJ.js";import{k as l}from"./LD5MEXEL.js";import{join as p}from"node:path";function k(t,n){let e=$(t,"swr");if(e.length===0)return"";let s=e.some(a),o=e.some(r=>!a(r));return[...s?['import useSWR from "swr";']:[],...o?['import useSWRMutation from "swr/mutation";']:[],f(e,n.sdkModule,s),...e.flatMap(r=>a(r)?g(r):[S(r)])].join(`
|
|
8
8
|
|
|
9
9
|
`)}function y(t,n,e){return`export function use${l(t.name)}(${n}) {
|
|
10
10
|
return ${e};
|
|
@@ -4,7 +4,7 @@ import { dirname as __pathDirname } from 'node:path';
|
|
|
4
4
|
const require = __createRequire(import.meta.url);
|
|
5
5
|
var __filename = __fileURLToPath(import.meta.url);
|
|
6
6
|
var __dirname = __pathDirname(__filename);
|
|
7
|
-
import{a as h}from"./
|
|
7
|
+
import{a as h}from"./GSOISRWG.js";import{e as g,h as p,k as $}from"./LD5MEXEL.js";import{join as R}from"node:path";var a=" ";function m(e){return`${$(e)}Schema`}var y=new Map;function u(e,r=y,t=""){return j(w(e,r,t),e)}function w(e,r,t){switch(e.kind){case"scalar":return z(e.scalar,e.metadata);case"object":return b(e.properties,r,t);case"array":return`z.array(${u(e.items,r,t)})`;case"record":return`z.record(z.string(), ${u(e.value,r,t)})`;case"ref":return`z.lazy(() => ${m(e.name)})`;case"literal":return`z.literal(${p(e.value)})`;case"enum":return q(e.values);case"union":return k(e.members,r,t);case"intersection":return e.members.map(n=>u(n,r,t)).reduce((n,o)=>`${n}.and(${o})`);case"null":return"z.null()";case"unknown":return"z.unknown()";case"omit":return E(e.base,e.keys,r,t)}}function z(e,r){switch(e){case"string":return r?.format==="binary"?"z.instanceof(Blob)":"z.string()";case"integer":return"z.number().int()";case"number":return"z.number()";case"boolean":return"z.boolean()"}}function c(e){return g(e)===e?e:JSON.stringify(e)}function b(e,r,t){if(e.length===0)return"z.object({})";let n=t+a;return`z.object({
|
|
8
8
|
${e.map((s,i)=>{let d=u(s.schema,r,n),l=s.required?d:`${d}.optional()`,x=i===e.length-1?"":",";return`${n}${c(s.name)}: ${l}${x}`}).join(`
|
|
9
9
|
`)}
|
|
10
10
|
${t}})`}function q(e){return e.every(r=>typeof r=="string")?`z.enum([${e.map(r=>JSON.stringify(r)).join(", ")}])`:`z.union([${e.map(r=>`z.literal(${p(r)})`).join(", ")}])`}function k(e,r,t){let n=e.map(o=>u(o,r,t));return n.length===1?n[0]:`z.union([${n.join(", ")}])`}function E(e,r,t,n){let o=t.get(e);if(o&&o.kind!=="object")return u(f(o,r,t,new Set([e])),t,n);let s=r.map(i=>`${c(i)}: true`).join(", ");return`${m(e)}.omit({ ${s} })`}function f(e,r,t,n){switch(e.kind){case"object":return{...e,properties:e.properties.filter(o=>!r.includes(o.name))};case"union":case"intersection":return{...e,members:e.members.map(o=>f(o,r,t,n))};case"ref":{if(n.has(e.name))return e;let o=t.get(e.name);if(!o)return e;if(o.kind==="object"){let s=r.filter(i=>o.properties.some(d=>d.name===i));return s.length>0?{kind:"omit",base:e.name,keys:s}:e}return f(o,r,t,new Set([...n,e.name]))}default:return e}}function j(e,r){let t=r.metadata;if(!t)return e;let n=e;return r.kind==="scalar"&&r.scalar==="string"&&(t.minLength!==void 0&&(n=`${n}.min(${t.minLength})`),t.maxLength!==void 0&&(n=`${n}.max(${t.maxLength})`),t.pattern!==void 0&&(n=`${n}.regex(new RegExp(${JSON.stringify(t.pattern)}))`)),r.kind==="scalar"&&(r.scalar==="number"||r.scalar==="integer")&&(t.minimum!==void 0&&(n=`${n}.min(${t.minimum})`),t.maximum!==void 0&&(n=`${n}.max(${t.maximum})`),t.exclusiveMinimum!==void 0&&(n=`${n}.gt(${t.exclusiveMinimum})`),t.exclusiveMaximum!==void 0&&(n=`${n}.lt(${t.exclusiveMaximum})`)),r.kind==="array"&&(t.minItems!==void 0&&(n=`${n}.min(${t.minItems})`),t.maxItems!==void 0&&(n=`${n}.max(${t.maxItems})`)),n}function Z(e,r){let t=[];for(let n of h(e.services)){if(n.sse!==void 0)continue;let o=n.requestBody,s=o&&o.contentType.toLowerCase().includes("json")?u(o.schema,r,a):void 0,i=n.successResponses.find(l=>l.contentType.toLowerCase().includes("json")),d=i?u(i.schema,r,a):void 0;!s&&!d||t.push({name:n.specName??n.name,request:s,response:d})}return t}function I(e){let r=e.flatMap(n=>[`${a}${c(n.name)}: {`,...n.request?[`${a}${a}request: z.ZodType;`]:[],...n.response?[`${a}${a}response: z.ZodType;`]:[],`${a}};`]),t=e.map((n,o)=>{let s=[...n.request?[`request: ${n.request}`]:[],...n.response?[`response: ${n.response}`]:[]].join(", "),i=o===e.length-1?"":",";return`${a}${c(n.name)}: { ${s} }${i}`});return["/**"," * Request/response validators by operationId \u2014 powers `zodValidation`, or import one directly."," */","export const operationSchemas: {",...r,"} = {",...t,"};"].join(`
|
|
@@ -4,4 +4,4 @@ import { dirname as __pathDirname } from 'node:path';
|
|
|
4
4
|
const require = __createRequire(import.meta.url);
|
|
5
5
|
var __filename = __fileURLToPath(import.meta.url);
|
|
6
6
|
var __dirname = __pathDirname(__filename);
|
|
7
|
-
import{c as a,d as b}from"./
|
|
7
|
+
import{c as a,d as b}from"./KMNJCAYW.js";import"./GSOISRWG.js";import"./WZXA5XPB.js";import"./HXPNR55A.js";import"./NEWT5A6S.js";import"./LD5MEXEL.js";import"./UW4UC7ZI.js";import"./RFWIIJFG.js";export{b as generateClient,a as runGenerators};
|
|
@@ -4,7 +4,7 @@ import { dirname as __pathDirname } from 'node:path';
|
|
|
4
4
|
const require = __createRequire(import.meta.url);
|
|
5
5
|
var __filename = __fileURLToPath(import.meta.url);
|
|
6
6
|
var __dirname = __pathDirname(__filename);
|
|
7
|
-
import{a as C}from"./
|
|
7
|
+
import{a as C}from"./GSOISRWG.js";import{c as w}from"./HXPNR55A.js";import{a as H,e as q,g as P,h as g,k as E}from"./LD5MEXEL.js";import{join as ae}from"node:path";var j=class{code;constructor(r){this.code=r}};function A(e,r,n={}){let t=new Map(r.map(s=>[s.name,s.schema])),o=k(e,t,new Set,n.dateType??"string");return o===b?null:o}var b=Symbol("cycle");function J(e,r){if(e.kind==="union"){for(let t of e.members){let o=J(t,r);if(o)return o}return}if(e.kind!=="scalar")return;let n=e.metadata?.format;if(n==="binary")return new j("new Blob([])");if(r==="Date"){if(n==="date-time")return new j('new Date("2024-01-01T00:00:00Z")');if(n==="date")return new j('new Date("2024-01-01")')}}function I(e,r){let n=new Map,t=[],o=!1;for(let s of e){if(s.kind==="unknown")continue;let i=G(s,r);if(i?.kind!=="object"){t.push(s);continue}o=!0;for(let a of i.properties){let u=O(a.schema,r,new Set),c=n.get(a.name);(c===void 0||u>=c.rank)&&n.set(a.name,{schema:a.schema,required:a.required||(c?.required??!1),rank:u})}}return o?{merged:{kind:"object",properties:[...n.entries()].map(([s,i])=>({name:s,schema:i.schema,required:i.required}))},rest:t}:{merged:void 0,rest:t}}function G(e,r){let n=new Set,t=e;for(;t?.kind==="ref";){if(n.has(t.name))return;n.add(t.name),t=r.get(t.name)}return t}function O(e,r,n){switch(e.kind){case"literal":return 40;case"enum":return e.values.length===1?40:30;case"union":return Math.max(0,...e.members.map(t=>O(t,r,n)))-1;case"ref":{if(n.has(e.name))return 20;let t=r.get(e.name);return t===void 0?20:O(t,r,new Set(n).add(e.name))}case"null":case"unknown":return 10;default:return 20}}function k(e,r,n,t){let o=J(e,t);if(o)return o;let s=e.metadata,i=a=>a===null?e.kind==="null"||e.kind==="union"&&e.members.some(u=>u.kind==="null"):e.kind==="enum"?e.values.includes(a):e.kind==="literal"?a===e.value:!0;if(s?.example!==void 0&&i(s.example))return s.example;if(s?.default!==void 0&&i(s.default))return s.default;switch(e.kind){case"scalar":return K(e.scalar,s);case"array":{let a=k(e.items,r,n,t);return a===b?[]:[a]}case"object":return Object.fromEntries(e.properties.flatMap(a=>{let u=k(a.schema,r,n,t);return u===b?a.required?[[a.name,null]]:[]:[[a.name,u]]}));case"record":{let a=k(e.value,r,n,t);return a===b?{}:{key:a}}case"enum":return e.values[0];case"literal":return e.value;case"union":{for(let a of e.members){let u=k(a,r,n,t);if(u!==b)return u}return e.members.length>0?b:null}case"intersection":{let{merged:a,rest:u}=I(e.members,r),c=u.map(m=>k(m,r,n,t)).filter(m=>m!==b);if(a){let m=k(a,r,n,t),M=w(m)?m:{};for(let V of c)w(V)&&Object.assign(M,V);return M}let h=c.filter(w);return h.length>0?h.reduce((m,M)=>Object.assign(m,M),{}):c.length>0?c[0]:{}}case"omit":{let a=r.get(e.base);if(!a)return null;let u=k(a,r,n,t);if(w(u)){let c={...u};for(let h of e.keys)delete c[h];return c}return u}case"ref":{if(n.has(e.name))return b;let a=r.get(e.name);if(!a)return null;n.add(e.name);let u=k(a,r,n,t);return n.delete(e.name),u}case"null":case"unknown":return null}}function K(e,r){if(e==="boolean")return!0;if(e==="integer"||e==="number")return 0;switch(r?.format){case"email":return"user@example.com";case"uuid":return"00000000-0000-4000-8000-000000000000";case"date-time":return"2024-01-01T00:00:00Z";case"date":return"2024-01-01";case"uri":case"url":return"https://example.com";default:return"string"}}var f=e=>({kind:"expr",text:e}),d=e=>({kind:"object",entries:e});function l(e){return e.kind==="object"}function D(e,r){return l(e)?d([...e.entries,{spread:r}]):e}var L=" ";function x(e,r){switch(e.kind){case"expr":return e.text;case"wrap":return`${e.before}${x(e.value,r)}${e.after}`;case"array":{if(e.items.length===0)return"[]";let n=r+L;return`[
|
|
8
8
|
${e.items.map((o,s)=>`${n}${x(o,n)}${s===e.items.length-1?"":","}`).join(`
|
|
9
9
|
`)}
|
|
10
10
|
${r}]`}case"object":{if(e.entries.length===0)return"{}";let n=r+L;return`{
|
|
@@ -4,9 +4,9 @@ import { dirname as __pathDirname } from 'node:path';
|
|
|
4
4
|
const require = __createRequire(import.meta.url);
|
|
5
5
|
var __filename = __fileURLToPath(import.meta.url);
|
|
6
6
|
var __dirname = __pathDirname(__filename);
|
|
7
|
-
import{a as
|
|
7
|
+
import{a as A,d as E,e as B,g as F,o as O,p as h}from"./QSWITRBO.js";import{a as b}from"./Y2HPLCNE.js";import{g as I}from"./NABUP3PL.js";import{O as P,P as v,Q as i,S as u,T as m,X as a,ca as d,m as c}from"./HXPNR55A.js";var y=class extends Error{};async function X({argv:t,version:e}){let n=performance.now(),s=new b,{organization:o,project:p,pushId:$,wait:g}=t,T=t.domain||F(),w=t["continue-on-deploy-failures"]||!1,U=t["start-time"]||Date.now(),S=[];try{let f=B(),R={domain:T,apiKey:f,organization:o,project:p,pushId:$,version:e,onSunsetWarning:l=>S.push(l)},x={...R,maxExecutionTime:t["max-execution-time"],retryIntervalMs:t["retry-interval"]?t["retry-interval"]*1e3:void 0,startTime:U},D=l=>j=>{let{status:C,url:z}=j.status[l].deploy;s.start(M({status:C,url:z,buildType:l,wait:g}))},r=g?await h({...x,buildType:"preview",onRetry:D("preview")}):await O(R);return W({buildType:"preview",spinner:s,push:r,continueOnDeployFailures:w}),L(r.status.preview.scorecard),g&&r.isMainBranch&&r.status.preview.deploy.status==="success"&&(r=await h({...x,buildType:"production",onRetry:D("production")})),r.isMainBranch&&(W({buildType:"production",spinner:s,push:r,continueOnDeployFailures:w}),L(r.status.production.scorecard)),K({organization:o,project:p,pushId:$,startedAt:n}),{preview:r.status.preview,production:r.isMainBranch?r.status.production:null,commit:r.commit}}catch(f){s.stop(),N("\u2717 Failed to get push status.",f)}finally{s.stop(),k("push-status",S)}}function N(t,e){throw e instanceof y?new d(e.message):e instanceof A?new d(`${t} Reason: ${e.message} (status: ${e.status})
|
|
8
8
|
`):new d(`${t} Reason: ${e.message}
|
|
9
|
-
`)}function k(t,e){let n=
|
|
9
|
+
`)}function k(t,e){let n=E(e);if(!n)return;let s='Update to the latest version by running "npm install @redocly/cli@latest".';n.isSunsetExpired?a.error(`The "${t}" command is not compatible with your version of Redocly CLI. ${s}
|
|
10
10
|
|
|
11
11
|
`):a.warn(`The "${t}" command will be incompatible with your version of Redocly CLI after ${n.sunsetDate.toLocaleString()}. ${s}
|
|
12
12
|
|
|
@@ -4,7 +4,7 @@ import { dirname as __pathDirname } from 'node:path';
|
|
|
4
4
|
const require = __createRequire(import.meta.url);
|
|
5
5
|
var __filename = __fileURLToPath(import.meta.url);
|
|
6
6
|
var __dirname = __pathDirname(__filename);
|
|
7
|
-
import{a as O}from"./2U6O26CV.js";import{b as j,c as N,d as J,f as V,g as Q,h as Z,i as Y}from"./
|
|
7
|
+
import{a as O}from"./2U6O26CV.js";import{b as j,c as N,d as J,f as V,g as Q,h as Z,i as Y}from"./3U2KNDZX.js";import{a as H}from"./WZXA5XPB.js";import{a as F,b as T,c as C,d as P,e as W,g as B,h as M,i as _,j as A,k as z,l as U,n as K}from"./UW4UC7ZI.js";var G=C.go,S=class extends F{constructor(){super(" ")}typeName(t){return d(t)}memberName(t){return d(t)}identifier(t){return P(t,{style:"camel",reserved:G})}identifiers(t,n){let r=new Set(n??[]);return t.map(o=>{let s=d(o),a=s;for(let i=2;r.has(a);i++)a=`${s}${i}`;return r.add(a),a})}packageName(t){let n=t.toLowerCase().replace(/[^a-z0-9]/g,"");return n===""||/^[0-9]/.test(n)?"client":n}string(t){let n='"';for(let r of t){let o=r.codePointAt(0);r==="\\"?n+="\\\\":r==='"'?n+='\\"':r===`
|
|
8
8
|
`?n+="\\n":r==="\r"?n+="\\r":r===" "?n+="\\t":o<32||o===127?n+=`\\x${o.toString(16).padStart(2,"0")}`:o>=55296&&o<=57343?n+="\\uFFFD":n+=r}return n+'"'}literal(t){return t==null?"nil":typeof t=="boolean"||typeof t=="number"?String(t):typeof t=="string"?this.string(t):Array.isArray(t)?`[]any{${t.map(r=>this.literal(r)).join(", ")}}`:`map[string]any{${Object.entries(t).map(([r,o])=>`${this.string(r)}: ${this.literal(o)}`).join(", ")}}`}comment(t){for(let n of U(t))this.line(n===""?"//":`// ${n}`);return this}doc(t,n){let r=U(n);if(r.length===0)return this;this.line(`// ${t} \u2014 ${r[0]}`);let o=!1;for(let s of r.slice(1)){if(s===""){o||this.line("//"),o=!0;continue}this.line(`// ${s}`),o=!1}return this}layout(t){return ie(le(t))}toString(){return this.layout(super.toString())}};function d(e){let t=P(e,{style:"pascal",reserved:G});return t.startsWith("_")?`N${t.slice(1)}`:t}function ie(e){return`${e.replace(/\n{3,}/g,`
|
|
9
9
|
|
|
10
10
|
`).trimEnd()}
|
|
@@ -4,7 +4,7 @@ import { dirname as __pathDirname } from 'node:path';
|
|
|
4
4
|
const require = __createRequire(import.meta.url);
|
|
5
5
|
var __filename = __fileURLToPath(import.meta.url);
|
|
6
6
|
var __dirname = __pathDirname(__filename);
|
|
7
|
-
import{a as T,b as O,c as A,d as E}from"./
|
|
7
|
+
import{a as T,b as O,c as A,d as E}from"./LZ2TTGJR.js";import{c as m,k as C,r as $}from"./VH6GY6BQ.js";import{a as q}from"./LRUXN6H5.js";import{X as u,c as H,ca as y,da as R}from"./HXPNR55A.js";import"./NEWT5A6S.js";import{e as z}from"./RFWIIJFG.js";import{createReadStream as F,createWriteStream as k,existsSync as N}from"node:fs";import{appendFile as V,mkdir as _,rm as j,writeFile as W}from"node:fs/promises";import B from"node:path";import{createInterface as G}from"node:readline";var w=class{outputPath;entriesPath;creatorVersion;writeChain=Promise.resolve();directoryEnsured=!1;started=!1;count=0;constructor(t,r){this.outputPath=B.resolve(process.cwd(),t),this.entriesPath=`${this.outputPath}.entries.tmp`,this.creatorVersion=r}get entryCount(){return this.count}add(t){let r=`${JSON.stringify(t)}
|
|
8
8
|
`,n=this.writeChain.catch(()=>{}).then(()=>this.append(r)).then(()=>{this.count+=1});return this.writeChain=n.catch(()=>{}),n}async finalize(){await this.writeChain.catch(()=>{}),await this.ensureDirectory(),await this.writeDocument(),await j(this.entriesPath,{force:!0})}async append(t){if(await this.ensureDirectory(),!this.started){await W(this.entriesPath,t,"utf8"),this.started=!0;return}await V(this.entriesPath,t,"utf8")}async ensureDirectory(){this.directoryEnsured||(await _(B.dirname(this.outputPath),{recursive:!0}),this.directoryEnsured=!0)}async writeDocument(){let t=k(this.outputPath,{encoding:"utf8"}),r=n=>new Promise((o,s)=>{t.write(n,i=>i?s(i):o())});try{let n=JSON.stringify({name:"redocly-cli proxy",version:this.creatorVersion});await r(`{
|
|
9
9
|
"log": {
|
|
10
10
|
"version": "1.2",
|
|
@@ -4,4 +4,4 @@ import { dirname as __pathDirname } from 'node:path';
|
|
|
4
4
|
const require = __createRequire(import.meta.url);
|
|
5
5
|
var __filename = __fileURLToPath(import.meta.url);
|
|
6
6
|
var __dirname = __pathDirname(__filename);
|
|
7
|
-
import{a}from"./
|
|
7
|
+
import{a}from"./55D5R2CI.js";import"./3U2KNDZX.js";import"./GSOISRWG.js";import"./WZXA5XPB.js";import"./HXPNR55A.js";import"./NEWT5A6S.js";import"./LD5MEXEL.js";import"./UW4UC7ZI.js";import"./RFWIIJFG.js";export{a as zodGenerator};
|
|
@@ -10,4 +10,4 @@ import{a as bt,c as Nt}from"./RFWIIJFG.js";var Xt=Nt((Xe,Wt)=>{var Re=Object.pro
|
|
|
10
10
|
`);let t=new tt("!xml"),e=t,i="";this.matcher.reset(),this.entityDecoder.reset(),this.entityExpansionCount=0,this.currentExpandedLength=0;let n=this.options,o=new Z(n.processEntities),u=r.length;for(let s=0;s<u;s++)if(r[s]==="<"){let d=r.charCodeAt(s+1);if(d===47){let p=xt(r,">",s,"Closing Tag is not closed."),g=r.substring(s+2,p).trim();if(n.removeNSPrefix){let M=g.indexOf(":");M!==-1&&(g=g.substr(M+1))}g=Pt(n.transformTagName,g,"",n).tagName,e&&(i=this.saveTextToParentTag(i,e,this.readonlyMatcher));let O=this.matcher.getCurrentTag();if(g&&n.unpairedTagsSet.has(g))throw new Error(`Unpaired tag can not be used as closing tag: </${g}>`);O&&n.unpairedTagsSet.has(O)&&(this.matcher.pop(),this.tagsNodeStack.pop()),this.matcher.pop(),this.isCurrentNodeStopNode=!1,e=this.tagsNodeStack.pop(),i="",s=p}else if(d===63){let p=_t(r,s,!1,"?>");if(!p)throw new Error("Pi Tag is not closed.");i=this.saveTextToParentTag(i,e,this.readonlyMatcher);let g=this.buildAttributesMap(p.tagExp,this.matcher,p.tagName,!0);if(g){let O=g[this.options.attributeNamePrefix+"version"];this.entityDecoder.setXmlVersion(Number(O)||1)}if(!(n.ignoreDeclaration&&p.tagName==="?xml"||n.ignorePiTags)){let O=new tt(p.tagName);O.add(n.textNodeName,""),p.tagName!==p.tagExp&&p.attrExpPresent&&n.ignoreAttributes!==!0&&(O[":@"]=g),this.addChild(e,O,this.readonlyMatcher,s)}s=p.closeIndex+1}else if(d===33&&r.charCodeAt(s+2)===45&&r.charCodeAt(s+3)===45){let p=xt(r,"-->",s+4,"Comment is not closed.");if(n.commentPropName){let g=r.substring(s+4,p-2);i=this.saveTextToParentTag(i,e,this.readonlyMatcher),e.add(n.commentPropName,[{[n.textNodeName]:g}])}s=p}else if(d===33&&r.charCodeAt(s+2)===68){let p=o.readDocType(r,s);this.entityDecoder.addInputEntities(p.entities),s=p.i}else if(d===33&&r.charCodeAt(s+2)===91){let p=xt(r,"]]>",s,"CDATA is not closed.")-2,g=r.substring(s+9,p);i=this.saveTextToParentTag(i,e,this.readonlyMatcher);let O=this.parseTextData(g,e.tagname,this.readonlyMatcher,!0,!1,!0,!0);O==null&&(O=""),n.cdataPropName?e.add(n.cdataPropName,[{[n.textNodeName]:g}]):e.add(n.textNodeName,O),s=p+2}else{let p=_t(r,s,n.removeNSPrefix);if(!p){let at=r.substring(Math.max(0,s-50),Math.min(u,s+50));throw new Error(`readTagExp returned undefined at position ${s}. Context: "${at}"`)}let g=p.tagName,O=p.rawTagName,M=p.tagExp,L=p.attrExpPresent,k=p.closeIndex;if({tagName:g,tagExp:M}=Pt(n.transformTagName,g,M,n),n.strictReservedNames&&(g===n.commentPropName||g===n.cdataPropName||g===n.textNodeName||g===n.attributesGroupName))throw new Error(`Invalid tag name: ${g}`);e&&i&&e.tagname!=="!xml"&&(i=this.saveTextToParentTag(i,e,this.readonlyMatcher,!1));let V=e;V&&n.unpairedTagsSet.has(V.tagname)&&(e=this.tagsNodeStack.pop(),this.matcher.pop());let rt=!1;M.length>0&&M.lastIndexOf("/")===M.length-1&&(rt=!0,g[g.length-1]==="/"?(g=g.substr(0,g.length-1),M=g):M=M.substr(0,M.length-1),L=g!==M);let ot,st=null,dt={};ot=le(O),g!==t.tagname&&this.matcher.push(g,{},ot),g!==M&&L&&(st=this.buildAttributesMap(M,this.matcher,g),st&&(dt=ae(st,n))),g!==t.tagname&&(this.isCurrentNodeStopNode=this.isItStopNode());let ct=s;if(this.isCurrentNodeStopNode){let at="";if(rt)s=p.closeIndex;else if(n.unpairedTagsSet.has(g))s=p.closeIndex;else{let jt=this.readStopNodeData(r,O,k+1);if(!jt)throw new Error(`Unexpected end of ${O}`);s=jt.i,at=jt.tagContent}let Ct=new tt(g);st&&(Ct[":@"]=st),Ct.add(n.textNodeName,at),this.matcher.pop(),this.isCurrentNodeStopNode=!1,this.addChild(e,Ct,this.readonlyMatcher,ct)}else{if(rt){({tagName:g,tagExp:M}=Pt(n.transformTagName,g,M,n));let at=new tt(g);st&&(at[":@"]=st),this.addChild(e,at,this.readonlyMatcher,ct),this.matcher.pop(),this.isCurrentNodeStopNode=!1}else{if(n.unpairedTagsSet.has(g)){let at=new tt(g);st&&(at[":@"]=st),this.addChild(e,at,this.readonlyMatcher,ct),this.matcher.pop(),this.isCurrentNodeStopNode=!1,s=p.closeIndex;continue}{let at=new tt(g);if(this.tagsNodeStack.length>n.maxNestedTags)throw new Error("Maximum nested tags exceeded");this.tagsNodeStack.push(e),st&&(at[":@"]=st),this.addChild(e,at,this.readonlyMatcher,ct),e=at}}i="",s=k}}}else i+=r[s];return t.child};function me(r,t,e,i){this.options.captureMetaData||(i=void 0);let n=this.options.jPath?e.toString():e,o=this.options.updateTag(t.tagname,n,t[":@"]);o===!1||(typeof o=="string"&&(t.tagname=o),r.addChild(t,i))}function ge(r,t,e){let i=this.options.processEntities;if(!i||!i.enabled)return r;if(i.allowedTags){let n=this.options.jPath?e.toString():e;if(!(Array.isArray(i.allowedTags)?i.allowedTags.includes(t):i.allowedTags(t,n)))return r}if(i.tagFilter){let n=this.options.jPath?e.toString():e;if(!i.tagFilter(t,n))return r}return this.entityDecoder.decode(r)}function ye(r,t,e,i){return r&&(i===void 0&&(i=t.child.length===0),(r=this.parseTextData(r,t.tagname,e,!1,!!t[":@"]&&Object.keys(t[":@"]).length!==0,i))!==void 0&&r!==""&&t.add(this.options.textNodeName,r),r=""),r}function be(){return this.stopNodeExpressionsSet.size!==0&&this.matcher.matchesAny(this.stopNodeExpressionsSet)}function xt(r,t,e,i){let n=r.indexOf(t,e);if(n===-1)throw new Error(i);return n+t.length-1}function ve(r,t,e,i){let n=r.indexOf(t,e);if(n===-1)throw new Error(i);return n}function _t(r,t,e,i=">"){let n=(function(O,M,L=">"){let k=0,V=[],rt=O.length,ot=L.charCodeAt(0),st=L.length>1?L.charCodeAt(1):-1;for(let dt=M;dt<rt;dt++){let ct=O.charCodeAt(dt);if(k)ct===k&&(k=0);else if(ct===34||ct===39)k=ct;else if(ct===ot){if(st===-1)return{data:String.fromCharCode(...V),index:dt};if(O.charCodeAt(dt+1)===st)return{data:String.fromCharCode(...V),index:dt}}else if(ct===9){V.push(32);continue}V.push(ct)}})(r,t+1,i);if(!n)return;let o=n.data,u=n.index,s=o.search(/\s/),d=o,p=!0;s!==-1&&(d=o.substring(0,s),o=o.substring(s+1).trimStart());let g=d;if(e){let O=d.indexOf(":");O!==-1&&(d=d.substr(O+1),p=d!==n.data.substr(O+1))}return{tagName:d,tagExp:o,closeIndex:u,attrExpPresent:p,rawTagName:g}}function xe(r,t,e){let i=e,n=1,o=r.length;for(;e<o;e++)if(r[e]==="<"){let u=r.charCodeAt(e+1);if(u===47){let s=ve(r,">",e,`${t} is not closed`);if(r.substring(e+2,s).trim()===t&&(n--,n===0))return{tagContent:r.substring(i,e),i:s};e=s}else if(u===63)e=xt(r,"?>",e+1,"StopNode is not closed.");else if(u===33&&r.charCodeAt(e+2)===45&&r.charCodeAt(e+3)===45)e=xt(r,"-->",e+3,"StopNode is not closed.");else if(u===33&&r.charCodeAt(e+2)===91)e=xt(r,"]]>",e,"StopNode is not closed.")-2;else{let s=_t(r,e,">");s&&((s&&s.tagName)===t&&s.tagExp[s.tagExp.length-1]!=="/"&&n++,e=s.closeIndex)}}}function Rt(r,t,e){if(t&&typeof r=="string"){let i=r.trim();return i==="true"||i!=="false"&&(function(n,o={}){if(o=Object.assign({},Ht,o),!n||typeof n!="string")return n;let u=n.trim();if(u.length===0||o.skipLike!==void 0&&o.skipLike.test(u))return n;if(u==="0")return 0;if(o.hex&>.test(u))return(function(d){if(parseInt)return parseInt(d,16);if(Number.parseInt)return Number.parseInt(d,16);if(window&&window.parseInt)return window.parseInt(d,16);throw new Error("parseInt, Number.parseInt, window.parseInt are not supported")})(u);if(isFinite(u)){if(u.includes("e")||u.includes("E"))return(function(d,p,g){if(!g.eNotation)return d;let O=p.match(Qt);if(O){let M=O[1]||"",L=O[3].indexOf("e")===-1?"E":"e",k=O[2],V=M?d[k.length+1]===L:d[k.length]===L;return k.length>1&&V?d:(k.length!==1||!O[3].startsWith(`.${L}`)&&O[3][0]!==L)&&k.length>0?g.leadingZeros&&!V?(p=(O[1]||"")+O[3],Number(p)):d:Number(p)}return d})(n,u,o);{let d=ht.exec(u);if(d){let p=d[1]||"",g=d[2],O=((s=d[3])&&s.indexOf(".")!==-1&&((s=s.replace(/0+$/,""))==="."?s="0":s[0]==="."?s="0"+s:s[s.length-1]==="."&&(s=s.substring(0,s.length-1))),s),M=p?n[g.length+1]===".":n[g.length]===".";if(!o.leadingZeros&&(g.length>1||g.length===1&&!M))return n;{let L=Number(u),k=String(L);if(L===0)return L;if(k.search(/[eE]/)!==-1)return o.eNotation?L:n;if(u.indexOf(".")!==-1)return k==="0"||k===O||k===`${p}${O}`?L:n;let V=g?O:u;return g?V===k||p+V===k?L:n:V===k||V===p+k?L:n}}return n}}var s;return(function(d,p,g){let O=p===1/0;switch(g.infinity.toLowerCase()){case"null":return null;case"infinity":return p;case"string":return O?"Infinity":"-Infinity";default:return d}})(n,Number(u),o)})(r,e)}return r!==void 0?r:""}function Pt(r,t,e,i){if(r){let n=r(t);e===t&&(e=n),t=n}return{tagName:t=kt(t,i),tagExp:e}}function kt(r,t){if($.includes(r))throw new Error(`[SECURITY] Invalid name: "${r}" is a reserved JavaScript keyword that could cause prototype pollution`);return j.includes(r)?t.onDangerousProperty(r):r}let At=tt.getMetaDataSymbol();function Ne(r,t){if(!r||typeof r!="object")return{};if(!t)return r;let e={};for(let i in r)i.startsWith(t)?e[i.substring(t.length)]=r[i]:e[i]=r[i];return e}function we(r,t,e,i){return Vt(r,t,e,i)}function Vt(r,t,e,i){let n,o={};for(let u=0;u<r.length;u++){let s=r[u],d=Oe(s);if(d!==void 0&&d!==t.textNodeName){let p=Ne(s[":@"]||{},t.attributeNamePrefix);e.push(d,p)}if(d===t.textNodeName)n===void 0?n=s[d]:n+=""+s[d];else{if(d===void 0)continue;if(s[d]){let p=Vt(s[d],t,e,i),g=Se(p,t);if(s[":@"]?Ee(p,s[":@"],i,t):Object.keys(p).length!==1||p[t.textNodeName]===void 0||t.alwaysCreateTextNode?Object.keys(p).length===0&&(t.alwaysCreateTextNode?p[t.textNodeName]="":p=""):p=p[t.textNodeName],s[At]!==void 0&&typeof p=="object"&&p!==null&&(p[At]=s[At]),o[d]!==void 0&&Object.prototype.hasOwnProperty.call(o,d))Array.isArray(o[d])||(o[d]=[o[d]]),o[d].push(p);else{let O=t.jPath?i.toString():i;t.isArray(d,O,g)?o[d]=[p]:o[d]=p}d!==void 0&&d!==t.textNodeName&&e.pop()}}}return typeof n=="string"?n.length>0&&(o[t.textNodeName]=n):n!==void 0&&(o[t.textNodeName]=n),o}function Oe(r){let t=Object.keys(r);for(let e=0;e<t.length;e++){let i=t[e];if(i!==":@")return i}}function Ee(r,t,e,i){if(t){let n=Object.keys(t),o=n.length;for(let u=0;u<o;u++){let s=n[u],d=s.startsWith(i.attributeNamePrefix)?s.substring(i.attributeNamePrefix.length):s,p=i.jPath?e.toString()+"."+d:e;i.isArray(s,p,!0,!0)?r[s]=[t[s]]:r[s]=t[s]}}}function Se(r,t){let{textNodeName:e}=t,i=Object.keys(r).length;return i===0||!(i!==1||!r[e]&&typeof r[e]!="boolean"&&r[e]!==0)}class _e{constructor(t){this.externalEntities={},this.options=G(t)}parse(t,e){if(typeof t!="string"&&t.toString)t=t.toString();else if(typeof t!="string")throw new Error("XML data is accepted in String or Bytes[] form.");if(e){e===!0&&(e={});let o=c(t,e);if(o!==!0)throw Error(`${o.err.msg}:${o.err.line}:${o.err.col}`)}let i=new ue(this.options);i.entityDecoder.setExternalEntities(this.externalEntities);let n=i.parseXml(t);return this.options.preserveOrder||n===void 0?n:we(n,this.options,i.matcher,i.readonlyMatcher)}addEntity(t,e){if(e.indexOf("&")!==-1)throw new Error("Entity value can't have '&'");if(t.indexOf("&")!==-1||t.indexOf(";")!==-1)throw new Error("An entity must be set without '&' and ';'. Eg. use '#xD' for '
'");if(e==="&")throw new Error("An entity with value '&' is not permitted");this.externalEntities[t]=e}static getMetaDataSymbol(){return tt.getMetaDataSymbol()}}function Pe(r,t){let e="";t.format&&t.indentBy.length>0&&(e=`
|
|
11
11
|
`);let i=[];if(t.stopNodes&&Array.isArray(t.stopNodes))for(let n=0;n<t.stopNodes.length;n++){let o=t.stopNodes[n];typeof o=="string"?i.push(new vt(o)):o instanceof vt&&i.push(o)}return Ft(r,t,e,new Ot,i)}function Ft(r,t,e,i,n){let o="",u=!1;if(t.maxNestedTags&&i.getDepth()>t.maxNestedTags)throw new Error("Maximum nested tags exceeded");if(!Array.isArray(r)){if(r!=null){let s=r.toString();return s=Tt(s,t),s}return""}for(let s=0;s<r.length;s++){let d=r[s],p=Gt(d);if(p===void 0)continue;let g=Ae(d[":@"],t);i.push(p,g);let O=Ce(i,n);if(p===t.textNodeName){let V=d[p];O||(V=t.tagValueProcessor(p,V),V=Tt(V,t)),u&&(o+=e),o+=V,u=!1,i.pop();continue}if(p===t.cdataPropName){u&&(o+=e);let V=d[p][0][t.textNodeName];o+=`<![CDATA[${String(V).replace(/\]\]>/g,"]]]]><![CDATA[>")}]]>`,u=!1,i.pop();continue}if(p===t.commentPropName){let V=d[p][0][t.textNodeName];o+=e+`<!--${String(V).replace(/--/g,"- -").replace(/-$/,"- ")}-->`,u=!0,i.pop();continue}if(p[0]==="?"){let V=Bt(d[":@"],t,O),rt=p==="?xml"?"":e,ot=d[p][0][t.textNodeName];ot=ot.length!==0?" "+ot:"",o+=rt+`<${p}${ot}${V}?>`,u=!0,i.pop();continue}let M=e;M!==""&&(M+=t.indentBy);let L=e+`<${p}${Bt(d[":@"],t,O)}`,k;k=O?Ut(d[p],t):Ft(d[p],t,M,i,n),t.unpairedTags.indexOf(p)!==-1?t.suppressUnpairedNode?o+=L+">":o+=L+"/>":k&&k.length!==0||!t.suppressEmptyNode?k&&k.endsWith(">")?o+=L+`>${k}${e}</${p}>`:(o+=L+">",k&&e!==""&&(k.includes("/>")||k.includes("</"))?o+=e+t.indentBy+k+e:o+=k,o+=`</${p}>`):o+=L+"/>",u=!0,i.pop()}return o}function Ae(r,t){if(!r||t.ignoreAttributes)return null;let e={},i=!1;for(let n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n.startsWith(t.attributeNamePrefix)?n.substr(t.attributeNamePrefix.length):n]=r[n],i=!0);return i?e:null}function Ut(r,t){if(!Array.isArray(r))return r!=null?r.toString():"";let e="";for(let i=0;i<r.length;i++){let n=r[i],o=Gt(n);if(o===t.textNodeName)e+=n[o];else if(o===t.cdataPropName)e+=n[o][0][t.textNodeName];else if(o===t.commentPropName)e+=n[o][0][t.textNodeName];else{if(o&&o[0]==="?")continue;if(o){let u=Te(n[":@"],t),s=Ut(n[o],t);s&&s.length!==0?e+=`<${o}${u}>${s}</${o}>`:e+=`<${o}${u}/>`}}}return e}function Te(r,t){let e="";if(r&&!t.ignoreAttributes)for(let i in r){if(!Object.prototype.hasOwnProperty.call(r,i))continue;let n=r[i];n===!0&&t.suppressBooleanAttributes?e+=` ${i.substr(t.attributeNamePrefix.length)}`:e+=` ${i.substr(t.attributeNamePrefix.length)}="${n}"`}return e}function Gt(r){let t=Object.keys(r);for(let e=0;e<t.length;e++){let i=t[e];if(Object.prototype.hasOwnProperty.call(r,i)&&i!==":@")return i}}function Bt(r,t,e){let i="";if(r&&!t.ignoreAttributes)for(let n in r){if(!Object.prototype.hasOwnProperty.call(r,n))continue;let o;e?o=r[n]:(o=t.attributeValueProcessor(n,r[n]),o=Tt(o,t)),o===!0&&t.suppressBooleanAttributes?i+=` ${n.substr(t.attributeNamePrefix.length)}`:i+=` ${n.substr(t.attributeNamePrefix.length)}="${o}"`}return i}function Ce(r,t){if(!t||t.length===0)return!1;for(let e=0;e<t.length;e++)if(r.matches(t[e]))return!0;return!1}function Tt(r,t){if(r&&r.length>0&&t.processEntities)for(let e=0;e<t.entities.length;e++){let i=t.entities[e];r=r.replace(i.regex,i.val)}return r}let je={attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,cdataPropName:!1,format:!1,indentBy:" ",suppressEmptyNode:!1,suppressUnpairedNode:!0,suppressBooleanAttributes:!0,tagValueProcessor:function(r,t){return t},attributeValueProcessor:function(r,t){return t},preserveOrder:!1,commentPropName:!1,unpairedTags:[],entities:[{regex:new RegExp("&","g"),val:"&"},{regex:new RegExp(">","g"),val:">"},{regex:new RegExp("<","g"),val:"<"},{regex:new RegExp("'","g"),val:"'"},{regex:new RegExp('"',"g"),val:"""}],processEntities:!0,stopNodes:[],oneListGroup:!1,maxNestedTags:100,jPath:!0};function pt(r){if(this.options=Object.assign({},je,r),this.options.stopNodes&&Array.isArray(this.options.stopNodes)&&(this.options.stopNodes=this.options.stopNodes.map(e=>typeof e=="string"&&e.startsWith("*.")?".."+e.substring(2):e)),this.stopNodeExpressions=[],this.options.stopNodes&&Array.isArray(this.options.stopNodes))for(let e=0;e<this.options.stopNodes.length;e++){let i=this.options.stopNodes[e];typeof i=="string"?this.stopNodeExpressions.push(new vt(i)):i instanceof vt&&this.stopNodeExpressions.push(i)}var t;this.options.ignoreAttributes===!0||this.options.attributesGroupName?this.isAttribute=function(){return!1}:(this.ignoreAttributesFn=typeof(t=this.options.ignoreAttributes)=="function"?t:Array.isArray(t)?e=>{for(let i of t)if(typeof i=="string"&&e===i||i instanceof RegExp&&i.test(e))return!0}:()=>!1,this.attrPrefixLen=this.options.attributeNamePrefix.length,this.isAttribute=De),this.processTextOrObjNode=Me,this.options.format?(this.indentate=Ie,this.tagEndChar=`>
|
|
12
12
|
`,this.newLine=`
|
|
13
|
-
`):(this.indentate=function(){return""},this.tagEndChar=">",this.newLine="")}function Me(r,t,e,i){let n=this.extractAttributes(r);if(i.push(t,n),this.checkStopNode(i)){let u=this.buildRawContent(r),s=this.buildAttributesForStopNode(r);return i.pop(),this.buildObjectNode(u,t,s,e)}let o=this.j2x(r,e+1,i);return i.pop(),r[this.options.textNodeName]!==void 0&&Object.keys(r).length===1?this.buildTextValNode(r[this.options.textNodeName],t,o.attrStr,e,i):this.buildObjectNode(o.val,t,o.attrStr,e)}function Ie(r){return this.options.indentBy.repeat(r)}function De(r){return!(!r.startsWith(this.options.attributeNamePrefix)||r===this.options.textNodeName)&&r.substr(this.attrPrefixLen)}pt.prototype.build=function(r){if(this.options.preserveOrder)return Pe(r,this.options);{Array.isArray(r)&&this.options.arrayNodeName&&this.options.arrayNodeName.length>1&&(r={[this.options.arrayNodeName]:r});let t=new Ot;return this.j2x(r,0,t).val}},pt.prototype.j2x=function(r,t,e){let i="",n="";if(this.options.maxNestedTags&&e.getDepth()>=this.options.maxNestedTags)throw new Error("Maximum nested tags exceeded");let o=this.options.jPath?e.toString():e,u=this.checkStopNode(e);for(let s in r)if(Object.prototype.hasOwnProperty.call(r,s))if(r[s]===void 0)this.isAttribute(s)&&(n+="");else if(r[s]===null)this.isAttribute(s)||s===this.options.cdataPropName?n+="":s[0]==="?"?n+=this.indentate(t)+"<"+s+"?"+this.tagEndChar:n+=this.indentate(t)+"<"+s+"/"+this.tagEndChar;else if(r[s]instanceof Date)n+=this.buildTextValNode(r[s],s,"",t,e);else if(typeof r[s]!="object"){let d=this.isAttribute(s);if(d&&!this.ignoreAttributesFn(d,o))i+=this.buildAttrPairStr(d,""+r[s],u);else if(!d)if(s===this.options.textNodeName){let p=this.options.tagValueProcessor(s,""+r[s]);n+=this.replaceEntitiesValue(p)}else{e.push(s);let p=this.checkStopNode(e);if(e.pop(),p){let g=""+r[s];n+=g===""?this.indentate(t)+"<"+s+this.closeTag(s)+this.tagEndChar:this.indentate(t)+"<"+s+">"+g+"</"+s+this.tagEndChar}else n+=this.buildTextValNode(r[s],s,"",t,e)}}else if(Array.isArray(r[s])){let d=r[s].length,p="",g="";for(let O=0;O<d;O++){let M=r[s][O];if(M!==void 0)if(M===null)s[0]==="?"?n+=this.indentate(t)+"<"+s+"?"+this.tagEndChar:n+=this.indentate(t)+"<"+s+"/"+this.tagEndChar;else if(typeof M=="object")if(this.options.oneListGroup){e.push(s);let L=this.j2x(M,t+1,e);e.pop(),p+=L.val,this.options.attributesGroupName&&M.hasOwnProperty(this.options.attributesGroupName)&&(g+=L.attrStr)}else p+=this.processTextOrObjNode(M,s,t,e);else if(this.options.oneListGroup){let L=this.options.tagValueProcessor(s,M);L=this.replaceEntitiesValue(L),p+=L}else{e.push(s);let L=this.checkStopNode(e);if(e.pop(),L){let k=""+M;p+=k===""?this.indentate(t)+"<"+s+this.closeTag(s)+this.tagEndChar:this.indentate(t)+"<"+s+">"+k+"</"+s+this.tagEndChar}else p+=this.buildTextValNode(M,s,"",t,e)}}this.options.oneListGroup&&(p=this.buildObjectNode(p,s,g,t)),n+=p}else if(this.options.attributesGroupName&&s===this.options.attributesGroupName){let d=Object.keys(r[s]),p=d.length;for(let g=0;g<p;g++)i+=this.buildAttrPairStr(d[g],""+r[s][d[g]],u)}else n+=this.processTextOrObjNode(r[s],s,t,e);return{attrStr:i,val:n}},pt.prototype.buildAttrPairStr=function(r,t,e){return e||(t=this.options.attributeValueProcessor(r,""+t),t=this.replaceEntitiesValue(t)),this.options.suppressBooleanAttributes&&t==="true"?" "+r:" "+r+'="'+t+'"'},pt.prototype.extractAttributes=function(r){if(!r||typeof r!="object")return null;let t={},e=!1;if(this.options.attributesGroupName&&r[this.options.attributesGroupName]){let i=r[this.options.attributesGroupName];for(let n in i)Object.prototype.hasOwnProperty.call(i,n)&&(t[n.startsWith(this.options.attributeNamePrefix)?n.substring(this.options.attributeNamePrefix.length):n]=i[n],e=!0)}else for(let i in r){if(!Object.prototype.hasOwnProperty.call(r,i))continue;let n=this.isAttribute(i);n&&(t[n]=r[i],e=!0)}return e?t:null},pt.prototype.buildRawContent=function(r){if(typeof r=="string")return r;if(typeof r!="object"||r===null)return String(r);if(r[this.options.textNodeName]!==void 0)return r[this.options.textNodeName];let t="";for(let e in r){if(!Object.prototype.hasOwnProperty.call(r,e)||this.isAttribute(e)||this.options.attributesGroupName&&e===this.options.attributesGroupName)continue;let i=r[e];if(e===this.options.textNodeName)t+=i;else if(Array.isArray(i)){for(let n of i)if(typeof n=="string"||typeof n=="number")t+=`<${e}>${n}</${e}>`;else if(typeof n=="object"&&n!==null){let o=this.buildRawContent(n),u=this.buildAttributesForStopNode(n);t+=o===""?`<${e}${u}/>`:`<${e}${u}>${o}</${e}>`}}else if(typeof i=="object"&&i!==null){let n=this.buildRawContent(i),o=this.buildAttributesForStopNode(i);t+=n===""?`<${e}${o}/>`:`<${e}${o}>${n}</${e}>`}else t+=`<${e}>${i}</${e}>`}return t},pt.prototype.buildAttributesForStopNode=function(r){if(!r||typeof r!="object")return"";let t="";if(this.options.attributesGroupName&&r[this.options.attributesGroupName]){let e=r[this.options.attributesGroupName];for(let i in e){if(!Object.prototype.hasOwnProperty.call(e,i))continue;let n=i.startsWith(this.options.attributeNamePrefix)?i.substring(this.options.attributeNamePrefix.length):i,o=e[i];o===!0&&this.options.suppressBooleanAttributes?t+=" "+n:t+=" "+n+'="'+o+'"'}}else for(let e in r){if(!Object.prototype.hasOwnProperty.call(r,e))continue;let i=this.isAttribute(e);if(i){let n=r[e];n===!0&&this.options.suppressBooleanAttributes?t+=" "+i:t+=" "+i+'="'+n+'"'}}return t},pt.prototype.buildObjectNode=function(r,t,e,i){if(r==="")return t[0]==="?"?this.indentate(i)+"<"+t+e+"?"+this.tagEndChar:this.indentate(i)+"<"+t+e+this.closeTag(t)+this.tagEndChar;{let n="</"+t+this.tagEndChar,o="";return t[0]==="?"&&(o="?",n=""),!e&&e!==""||r.indexOf("<")!==-1?this.options.commentPropName!==!1&&t===this.options.commentPropName&&o.length===0?this.indentate(i)+`<!--${r}-->`+this.newLine:this.indentate(i)+"<"+t+e+o+this.tagEndChar+r+this.indentate(i)+n:this.indentate(i)+"<"+t+e+o+">"+r+n}},pt.prototype.closeTag=function(r){let t="";return this.options.unpairedTags.indexOf(r)!==-1?this.options.suppressUnpairedNode||(t="/"):t=this.options.suppressEmptyNode?"/":`></${r}`,t},pt.prototype.checkStopNode=function(r){if(!this.stopNodeExpressions||this.stopNodeExpressions.length===0)return!1;for(let t=0;t<this.stopNodeExpressions.length;t++)if(r.matches(this.stopNodeExpressions[t]))return!0;return!1},pt.prototype.buildTextValNode=function(r,t,e,i,n){if(this.options.cdataPropName!==!1&&t===this.options.cdataPropName){let o=String(r).replace(/\]\]>/g,"]]]]><![CDATA[>");return this.indentate(i)+`<![CDATA[${o}]]>`+this.newLine}if(this.options.commentPropName!==!1&&t===this.options.commentPropName){let o=String(r).replace(/--/g,"- -").replace(/-$/,"- ");return this.indentate(i)+`<!--${o}-->`+this.newLine}if(t[0]==="?")return this.indentate(i)+"<"+t+e+"?"+this.tagEndChar;{let o=this.options.tagValueProcessor(t,r);return o=this.replaceEntitiesValue(o),o===""?this.indentate(i)+"<"+t+e+this.closeTag(t)+this.tagEndChar:this.indentate(i)+"<"+t+e+">"+o+"</"+t+this.tagEndChar}},pt.prototype.replaceEntitiesValue=function(r){if(r&&r.length>0&&this.options.processEntities)for(let t=0;t<this.options.entities.length;t++){let e=this.options.entities[t];r=r.replace(e.regex,e.val)}return r};let $e=pt,Le={validate:c};R.exports=h})()},{}],2:[function(_,R,w){var I=Object.prototype.hasOwnProperty,h=Object.prototype.toString;R.exports=function(y,N,D){if(h.call(N)!=="[object Function]")throw new TypeError("iterator must be a function");var j=y.length;if(j===+j)for(var $=0;$<j;$++)N.call(D,y[$],$,y);else for(var l in y)I.call(y,l)&&N.call(D,y[l],l,y)}},{}],3:[function(_,R,w){"use strict";var I=_("foreach");R.exports=h;function h(A,y,N){if(arguments.length===3)return h.set(A,y,N);if(arguments.length===2)return h.get(A,y);var D=h.bind(h,A);for(var j in h)h.hasOwnProperty(j)&&(D[j]=h[j].bind(D,A));return D}h.get=function(y,N){for(var D=Array.isArray(N)?N:h.parse(N),j=0;j<D.length;++j){var $=D[j];if(!(typeof y=="object"&&$ in y))throw new Error("Invalid reference token: "+$);y=y[$]}return y},h.set=function(y,N,D){var j=Array.isArray(N)?N:h.parse(N),$=j[0];if(j.length===0)throw Error("Can not set the root object");for(var l=0;l<j.length-1;++l){var c=j[l];typeof c!="string"&&typeof c!="number"&&(c=String(c)),!(c==="__proto__"||c==="constructor"||c==="prototype")&&(c==="-"&&Array.isArray(y)&&(c=y.length),$=j[l+1],c in y||($.match(/^(\d+|-)$/)?y[c]=[]:y[c]={}),y=y[c])}return $==="-"&&Array.isArray(y)&&($=y.length),y[$]=D,this},h.remove=function(A,y){var N=Array.isArray(y)?y:h.parse(y),D=N[N.length-1];if(D===void 0)throw new Error('Invalid JSON pointer for remove: "'+y+'"');var j=h.get(A,N.slice(0,-1));if(Array.isArray(j)){var $=+D;if(D===""&&isNaN($))throw new Error('Invalid array index: "'+D+'"');Array.prototype.splice.call(j,$,1)}else delete j[D]},h.dict=function(y,N){var D={};return h.walk(y,function(j,$){D[$]=j},N),D},h.walk=function(y,N,D){var j=[];D=D||function($){var l=Object.prototype.toString.call($);return l==="[object Object]"||l==="[object Array]"},(function $(l){I(l,function(c,v){j.push(String(v)),D(c)?$(c):N(c,h.compile(j)),j.pop()})})(y)},h.has=function(y,N){try{h.get(y,N)}catch{return!1}return!0},h.escape=function(y){return y.toString().replace(/~/g,"~0").replace(/\//g,"~1")},h.unescape=function(y){return y.replace(/~1/g,"/").replace(/~0/g,"~")},h.parse=function(y){if(y==="")return[];if(y.charAt(0)!=="/")throw new Error("Invalid JSON pointer: "+y);return y.substring(1).split(/\//).map(h.unescape)},h.compile=function(y){return y.length===0?"":"/"+y.map(h.escape).join("/")}},{foreach:2}],4:[function(_,R,w){"use strict";Object.defineProperty(w,"__esModule",{value:!0}),w.allOfSample=$;var I=_("./traverse"),h=_("./utils");function A(l,c){var v=Object.keys(l);if(Object.getOwnPropertySymbols){var P=Object.getOwnPropertySymbols(l);c&&(P=P.filter(function(E){return Object.getOwnPropertyDescriptor(l,E).enumerable})),v.push.apply(v,P)}return v}function y(l){for(var c=1;c<arguments.length;c++){var v=arguments[c]!=null?arguments[c]:{};c%2?A(Object(v),!0).forEach(function(P){N(l,P,v[P])}):Object.getOwnPropertyDescriptors?Object.defineProperties(l,Object.getOwnPropertyDescriptors(v)):A(Object(v)).forEach(function(P){Object.defineProperty(l,P,Object.getOwnPropertyDescriptor(v,P))})}return l}function N(l,c,v){return(c=D(c))in l?Object.defineProperty(l,c,{value:v,enumerable:!0,configurable:!0,writable:!0}):l[c]=v,l}function D(l){var c=j(l,"string");return typeof c=="symbol"?c:c+""}function j(l,c){if(typeof l!="object"||!l)return l;var v=l[Symbol.toPrimitive];if(v!==void 0){var P=v.call(l,c||"default");if(typeof P!="object")return P;throw new TypeError("@@toPrimitive must return a primitive value.")}return(c==="string"?String:Number)(l)}function $(l,c,v,P,E){let F=(0,I.traverse)(l,v,P),q=[];for(let W of c){let{type:U,readOnly:K,writeOnly:f,value:m}=(0,I.traverse)(y({type:F.type},W),v,P,y(y({},E),{},{isAllOfChild:!0}));F.type&&U&&U!==F.type&&(console.warn("allOf: schemas with different types can't be merged"),F.type=U),F.type=F.type||U,F.readOnly=F.readOnly||K,F.writeOnly=F.writeOnly||f,m!=null&&q.push(m)}if(F.type==="object"){F.value=(0,h.mergeDeep)(F.value||{},...q.filter(W=>typeof W=="object"));for(let W in F.value)F.value[W]===h.SKIP_SYMBOL&&delete F.value[W];return F}else{F.type==="array"&&(v.quiet||console.warn('OpenAPI Sampler: found allOf with "array" type. Result may be incorrect'));let W=q[q.length-1];return F.value=W??F.value,F}}},{"./traverse":14,"./utils":15}],5:[function(_,R,w){"use strict";Object.defineProperty(w,"__esModule",{value:!0}),w.inferType=h;let I={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 h(A){if(A.type!==void 0)return Array.isArray(A.type)?A.type.length===0?null:A.type[0]:A.type;let y=Object.keys(I);for(var N=0;N<y.length;N++){let D=y[N],j=I[D];if(A[D]!==void 0)return j}return null}},{}],6:[function(_,R,w){"use strict";Object.defineProperty(w,"__esModule",{value:!0}),w._registerSampler=l,w._samplers=void 0,Object.defineProperty(w,"inferType",{enumerable:!0,get:function(){return y.inferType}}),w.sample=$;var I=_("./traverse"),h=_("./samplers/index"),A=_("fast-xml-parser"),y=_("./infer"),N=w._samplers={};let D={skipReadOnly:!1,maxSampleDepth:15};function j(c,v){if(!c)throw new Error("Unknown format output for building XML.");if(Array.isArray(c)||Object.keys(c).length>1){var P;c={[(v==null||(P=v.xml)===null||P===void 0?void 0:P.name)||"root"]:c}}return new A.XMLBuilder({ignoreAttributes:!1,format:!0,attributeNamePrefix:"$",textNodeName:"#text",cdataPropName:"#cdata"}).build(c)}function $(c,v,P){let E=Object.assign({},D,v);(0,I.clearCache)();let F=(0,I.traverse)(c,E,P).value;return E?.format==="xml"?j(F,c):F}function l(c,v){N[c]=v}l("array",h.sampleArray),l("boolean",h.sampleBoolean),l("integer",h.sampleNumber),l("number",h.sampleNumber),l("object",h.sampleObject),l("string",h.sampleString)},{"./infer":5,"./samplers/index":9,"./traverse":14,"fast-xml-parser":1}],7:[function(_,R,w){"use strict";Object.defineProperty(w,"__esModule",{value:!0}),w.sampleArray=$;var I=_("../traverse"),h=_("../utils");function A(l,c){var v=Object.keys(l);if(Object.getOwnPropertySymbols){var P=Object.getOwnPropertySymbols(l);c&&(P=P.filter(function(E){return Object.getOwnPropertyDescriptor(l,E).enumerable})),v.push.apply(v,P)}return v}function y(l){for(var c=1;c<arguments.length;c++){var v=arguments[c]!=null?arguments[c]:{};c%2?A(Object(v),!0).forEach(function(P){N(l,P,v[P])}):Object.getOwnPropertyDescriptors?Object.defineProperties(l,Object.getOwnPropertyDescriptors(v)):A(Object(v)).forEach(function(P){Object.defineProperty(l,P,Object.getOwnPropertyDescriptor(v,P))})}return l}function N(l,c,v){return(c=D(c))in l?Object.defineProperty(l,c,{value:v,enumerable:!0,configurable:!0,writable:!0}):l[c]=v,l}function D(l){var c=j(l,"string");return typeof c=="symbol"?c:c+""}function j(l,c){if(typeof l!="object"||!l)return l;var v=l[Symbol.toPrimitive];if(v!==void 0){var P=v.call(l,c||"default");if(typeof P!="object")return P;throw new TypeError("@@toPrimitive must return a primitive value.")}return(c==="string"?String:Number)(l)}function $(l){let c=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},v=arguments.length>2?arguments[2]:void 0,P=arguments.length>3?arguments[3]:void 0,E=P&&P.depth||1,F=Math.min(l.maxItems!=null?l.maxItems:1/0,l.minItems||1),q=l.prefixItems||l.items||l.contains;Array.isArray(q)&&(F=Math.max(F,q.length));let W=f=>Array.isArray(q)?q[f]||{}:q||{},U=[];if(!q)return U;for(let f=0;f<F;f++){let m=W(f),{value:a}=(0,I.traverse)(m,c,v,{depth:E+1});if(c?.format==="xml"){let{value:x,propertyName:b}=(0,h.applyXMLAttributes)({value:a},m,P);if(b){var K;(K=U)!==null&&K!==void 0&&K[b]||(U=y(y({},U),{},{[b]:[]})),U[b].push(x)}else U=y(y({},U),x)}else U.push(a)}if(c?.format==="xml"&&E===1){let{value:f,propertyName:m}=(0,h.applyXMLAttributes)({value:null},l,P);m&&(f?U=Array.isArray(U)?{[m]:y(y({},f),U.map(a=>({"#text":y({},a)})))}:{[m]:y(y({},U),f)}:U={[m]:U})}return U}},{"../traverse":14,"../utils":15}],8:[function(_,R,w){"use strict";Object.defineProperty(w,"__esModule",{value:!0}),w.sampleBoolean=I;function I(h){return!0}},{}],9:[function(_,R,w){"use strict";Object.defineProperty(w,"__esModule",{value:!0}),Object.defineProperty(w,"sampleArray",{enumerable:!0,get:function(){return I.sampleArray}}),Object.defineProperty(w,"sampleBoolean",{enumerable:!0,get:function(){return h.sampleBoolean}}),Object.defineProperty(w,"sampleNumber",{enumerable:!0,get:function(){return A.sampleNumber}}),Object.defineProperty(w,"sampleObject",{enumerable:!0,get:function(){return y.sampleObject}}),Object.defineProperty(w,"sampleString",{enumerable:!0,get:function(){return N.sampleString}});var I=_("./array"),h=_("./boolean"),A=_("./number"),y=_("./object"),N=_("./string")},{"./array":7,"./boolean":8,"./number":10,"./object":11,"./string":13}],10:[function(_,R,w){"use strict";Object.defineProperty(w,"__esModule",{value:!0}),w.sampleNumber=I;function I(h){let A=0;if(h.type==="number"&&(h.format==="float"||h.format==="double")&&(A=.1),typeof h.exclusiveMinimum=="boolean"||typeof h.exclusiveMaximum=="boolean"){if(Number.isFinite(h.maximum)&&Number.isFinite(h.minimum))return A=h.exclusiveMinimum?Math.floor(h.minimum)+1:h.minimum,(h.exclusiveMaximum&&A>=h.maximum||!h.exclusiveMaximum&&A>h.maximum)&&(A=(h.maximum+h.minimum)/2),A;if(Number.isFinite(h.minimum))return h.exclusiveMinimum?Math.floor(h.minimum)+1:h.minimum;if(Number.isFinite(h.maximum))return h.exclusiveMaximum?h.maximum>0?0:Math.floor(h.maximum)-1:h.maximum>0?0:h.maximum}else{if(Number.isFinite(h.minimum))return h.minimum;Number.isFinite(h.exclusiveMinimum)?(A=Math.floor(h.exclusiveMinimum)+1,A===h.exclusiveMaximum&&(A=(A+Math.floor(h.exclusiveMaximum)-1)/2)):Number.isFinite(h.exclusiveMaximum)?A=Math.floor(h.exclusiveMaximum)-1:Number.isFinite(h.maximum)&&(A=h.maximum)}return A}},{}],11:[function(_,R,w){"use strict";Object.defineProperty(w,"__esModule",{value:!0}),w.sampleObject=$;var I=_("../traverse"),h=_("../utils");function A(l,c){var v=Object.keys(l);if(Object.getOwnPropertySymbols){var P=Object.getOwnPropertySymbols(l);c&&(P=P.filter(function(E){return Object.getOwnPropertyDescriptor(l,E).enumerable})),v.push.apply(v,P)}return v}function y(l){for(var c=1;c<arguments.length;c++){var v=arguments[c]!=null?arguments[c]:{};c%2?A(Object(v),!0).forEach(function(P){N(l,P,v[P])}):Object.getOwnPropertyDescriptors?Object.defineProperties(l,Object.getOwnPropertyDescriptors(v)):A(Object(v)).forEach(function(P){Object.defineProperty(l,P,Object.getOwnPropertyDescriptor(v,P))})}return l}function N(l,c,v){return(c=D(c))in l?Object.defineProperty(l,c,{value:v,enumerable:!0,configurable:!0,writable:!0}):l[c]=v,l}function D(l){var c=j(l,"string");return typeof c=="symbol"?c:c+""}function j(l,c){if(typeof l!="object"||!l)return l;var v=l[Symbol.toPrimitive];if(v!==void 0){var P=v.call(l,c||"default");if(typeof P!="object")return P;throw new TypeError("@@toPrimitive must return a primitive value.")}return(c==="string"?String:Number)(l)}function $(l){let c=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},v=arguments.length>2?arguments[2]:void 0,P=arguments.length>3?arguments[3]:void 0,E={},F=P&&P.depth||1;if(l&&typeof l.properties=="object"){let q=Array.isArray(l.required)?l.required:[],W={};for(let U of q)W[U]=!0;Object.keys(l.properties).forEach(U=>{if(c.skipNonRequired&&!W.hasOwnProperty(U))return;let K=(0,I.traverse)(l.properties[U],c,v,{propertyName:U,depth:F+1});if(c.skipReadOnly&&K.readOnly){P!=null&&P.isAllOfChild&&(E[U]=h.SKIP_SYMBOL);return}if(c.skipWriteOnly&&K.writeOnly){P!=null&&P.isAllOfChild&&(E[U]=h.SKIP_SYMBOL);return}if(c?.format==="xml"){let{propertyName:f,value:m}=(0,h.applyXMLAttributes)(K,l.properties[U],{propertyName:U});f?E[f]=m:m!==null&&typeof m=="object"&&(E=y(y({},E),m))}else E[U]=K.value})}if(l&&typeof l.additionalProperties=="object"){let q=l.additionalProperties["x-additionalPropertiesName"]||"property";E["".concat(String(q),"1")]=(0,I.traverse)(l.additionalProperties,c,v,{depth:F+1}).value,E["".concat(String(q),"2")]=(0,I.traverse)(l.additionalProperties,c,v,{depth:F+1}).value}if(l&&typeof l.properties=="object"&&l.maxProperties!==void 0&&Object.keys(E).length>l.maxProperties){let q={},W=0;(Array.isArray(l.required)?l.required:[]).forEach(K=>{E[K]!==void 0&&(q[K]=E[K],W++)}),Object.keys(E).forEach(K=>{W<l.maxProperties&&!q.hasOwnProperty(K)&&(q[K]=E[K],W++)}),E=q}return E}},{"../traverse":14,"../utils":15}],12:[function(_,R,w){"use strict";Object.defineProperty(w,"__esModule",{value:!0}),w.regexSample=y;function I(){return!0}function h(N,D){return N}function A(N,D,j){let $=1;if(N)switch(N){case"?":{$=I()?0:1;break}case"*":{$=h(0,8);break}case"+":{$=h(1,8);break}default:throw new Error("Unknown quantifier symbol provided.")}else D!=null&&j!=null?$=h(parseInt(D),parseInt(j)):D!=null&&j==null&&($=parseInt(D));return $}function y(N){let D=!1;if(N instanceof RegExp){var j,$;D=N.flags.includes("i"),N=N.toString(),N=(j=($=N.match(/\/(.+?)\//))===null||$===void 0?void 0:$[1])!==null&&j!==void 0?j:""}N=N.replace(/^(\^)?(.*?)(\$)?$/,"$2");let l,c,v,P=/([.A-Za-z0-9])(?:\{(\d+)(?:\,(\d+)|)\}|(\?|\*|\+))(?![^[]*]|[^{]*})/,E=N.match(P);for(;E!=null;){let K=E[2],f=E[3],m=E[4];v=A(m,K,f),N=N.slice(0,E.index)+E[1].repeat(v)+N.slice(E.index+E[0].length),E=N.match(P)}let F=/(\d-\d|\w-\w|\d|\w|[-!@#$&()`.+,/"])/,q=/\[(\^|)(-|)(.+?)\](?:\{(\d+)(?:\,(\d+)|)\}|(\?|\*|\+)|)/;for(E=N.match(q);E!=null;){let K=E[1]==="^",f=E[2]==="-",m=E[4],a=E[5],x=E[6],b=[],T=E[3],B=T.match(F);for(f&&b.push(45);B!=null;){if(B[0].indexOf("-")===-1)D&&isNaN(Number(B[0]))?(b.push(B[0].toUpperCase().charCodeAt(0)),b.push(B[0].toLowerCase().charCodeAt(0))):b.push(B[0].charCodeAt(0));else{let H=B[0].split("-").map(S=>S.charCodeAt(0));if(l=H[0],c=H[1],l>c)throw new Error("Character range provided is out of order.");for(let S=l;S<=c;S++)if(D&&isNaN(Number(String.fromCharCode(S)))){let G=String.fromCharCode(S);b.push(G.toUpperCase().charCodeAt(0)),b.push(G.toLowerCase().charCodeAt(0))}else b.push(S)}T=T.substring(B[0].length),B=T.match(F)}if(v=A(x,m,a),K){let H=-1;for(let S=48;S<=57;S++){if(H=b.indexOf(S),H>-1){b.splice(H,1);continue}b.push(S)}for(let S=65;S<=90;S++){if(H=b.indexOf(S),H>-1){b.splice(H,1);continue}b.push(S)}for(let S=97;S<=122;S++){if(H=b.indexOf(S),H>-1){b.splice(H,1);continue}b.push(S)}}let Q=Array.from({length:v},()=>String.fromCharCode(b[h(0,b.length-1)])).join("");N=N.slice(0,E.index)+Q+N.slice(E.index+E[0].length),E=N.match(q)}let W=/(.)\{(\d+)\,(\d+)\}/;for(E=N.match(W);E!=null;){if(l=parseInt(E[2]),c=parseInt(E[3]),l>c)throw new Error("Numbers out of order in {} quantifier.");v=h(l,c),N=N.slice(0,E.index)+E[1].repeat(v)+N.slice(E.index+E[0].length),E=N.match(W)}let U=/(.)\{(\d+)\}/;for(E=N.match(U);E!=null;)v=parseInt(E[2]),N=N.slice(0,E.index)+E[1].repeat(v)+N.slice(E.index+E[0].length),E=N.match(U);return N}},{}],13:[function(_,R,w){"use strict";Object.defineProperty(w,"__esModule",{value:!0}),w.sampleString=H;var I=_("../utils"),h=A(_("./string-regex"));function A(S,G){if(typeof WeakMap=="function")var X=new WeakMap,tt=new WeakMap;return(A=function(Z,z){if(!z&&Z&&Z.__esModule)return Z;var nt,ut,gt={__proto__:null,default:Z};if(Z===null||typeof Z!="object"&&typeof Z!="function")return gt;if(nt=z?tt:X){if(nt.has(Z))return nt.get(Z);nt.set(Z,gt)}for(let ht in Z)ht!=="default"&&{}.hasOwnProperty.call(Z,ht)&&((ut=(nt=Object.defineProperty)&&Object.getOwnPropertyDescriptor(Z,ht))&&(ut.get||ut.set)?nt(gt,ht,ut):gt[ht]=Z[ht]);return gt})(S,G)}let y="qwerty!@#$%^123456";function N(){return"user@example.com"}function D(){return"\u043F\u043E\u0448\u0442\u0430@\u0443\u043A\u0440.\u043D\u0435\u0442"}function j(S,G){let X="pa$$word";return S>X.length&&(X+="_",X+=(0,I.ensureMinLength)(y,S-X.length).substring(0,S-X.length)),X}function $(S){let{min:G,max:X,omitTime:tt,omitDate:Z}=S,z=(0,I.toRFCDateTime)(new Date("2019-08-24T14:15:22.123Z"),tt,Z,!1);return z.length<G&&console.warn("Using minLength = ".concat(G,' is incorrect with format "date-time"')),X&&z.length>X&&console.warn("Using maxLength = ".concat(X,' is incorrect with format "date-time"')),z}function l(S,G){return $({min:S,max:G,omitTime:!1,omitDate:!1})}function c(S,G){return $({min:S,max:G,omitTime:!0,omitDate:!1})}function v(S,G){return $({min:S,max:G,omitTime:!1,omitDate:!0}).slice(1)}function P(S,G,X,tt){let Z=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1;if(tt&&Z)return h.regexSample(tt);let z=(0,I.ensureMinLength)("string",S);return G&&z.length>G&&(z=z.substring(0,G)),z}function E(){return"192.168.0.1"}function F(){return"2001:0db8:85a3:0000:0000:8a2e:0370:7334"}function q(){return"example.com"}function W(){return"\u043F\u0440\u0438\u043A\u043B\u0430\u0434.\u0443\u043A\u0440"}function U(){return"http://example.com"}function K(){return"../dictionary"}function f(){return"http://example.com/{endpoint}"}function m(){return"http://example.com/entity/1"}function a(){return"/entity/1"}function x(S,G,X){return(0,I.uuid)(X||"id")}function b(){return"/json/pointer"}function T(){return"1/relative/json/pointer"}function B(){return"/regex/"}let Q={email:N,"idn-email":D,password:j,"date-time":l,date:c,time:v,ipv4:E,ipv6:F,hostname:q,"idn-hostname":W,iri:m,"iri-reference":a,uri:U,"uri-reference":K,"uri-template":f,uuid:x,default:P,"json-pointer":b,"relative-json-pointer":T,regex:B};function H(S,G,X,tt){let Z=S.format||"default",z=Q[Z]||P,nt=tt&&tt.propertyName;return z(S.minLength||0,S.maxLength,nt,S.pattern,G?.enablePatterns)}},{"../utils":15,"./string-regex":12}],14:[function(_,R,w){"use strict";Object.defineProperty(w,"__esModule",{value:!0}),w.clearCache=U,w.traverse=m;var I=_("./openapi-sampler"),h=_("./allOf"),A=_("./infer"),y=_("./utils"),N=j(_("json-pointer"));let D=["if","then"];function j(a){return a&&a.__esModule?a:{default:a}}function $(a,x){if(a==null)return{};var b,T,B=l(a,x);if(Object.getOwnPropertySymbols){var Q=Object.getOwnPropertySymbols(a);for(T=0;T<Q.length;T++)b=Q[T],x.indexOf(b)===-1&&{}.propertyIsEnumerable.call(a,b)&&(B[b]=a[b])}return B}function l(a,x){if(a==null)return{};var b={};for(var T in a)if({}.hasOwnProperty.call(a,T)){if(x.indexOf(T)!==-1)continue;b[T]=a[T]}return b}function c(a,x){var b=Object.keys(a);if(Object.getOwnPropertySymbols){var T=Object.getOwnPropertySymbols(a);x&&(T=T.filter(function(B){return Object.getOwnPropertyDescriptor(a,B).enumerable})),b.push.apply(b,T)}return b}function v(a){for(var x=1;x<arguments.length;x++){var b=arguments[x]!=null?arguments[x]:{};x%2?c(Object(b),!0).forEach(function(T){P(a,T,b[T])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(b)):c(Object(b)).forEach(function(T){Object.defineProperty(a,T,Object.getOwnPropertyDescriptor(b,T))})}return a}function P(a,x,b){return(x=E(x))in a?Object.defineProperty(a,x,{value:b,enumerable:!0,configurable:!0,writable:!0}):a[x]=b,a}function E(a){var x=F(a,"string");return typeof x=="symbol"?x:x+""}function F(a,x){if(typeof a!="object"||!a)return a;var b=a[Symbol.toPrimitive];if(b!==void 0){var T=b.call(a,x||"default");if(typeof T!="object")return T;throw new TypeError("@@toPrimitive must return a primitive value.")}return(x==="string"?String:Number)(a)}let q={},W=[];function U(){q={},W=[]}function K(a){let x;return a.const!==void 0?x=a.const:a.examples!==void 0&&a.examples.length?x=a.examples[0]:a.enum!==void 0&&a.enum.length?x=a.enum[0]:a.default!==void 0&&(x=a.default),x}function f(a){let x=K(a);if(x!==void 0)return{value:x,readOnly:a.readOnly,writeOnly:a.writeOnly,type:null}}function m(a,x,b,T){if(T){if(W.includes(a))return(0,y.getResultForCircular)((0,A.inferType)(a));W.push(a)}if(T&&T.depth>x.maxSampleDepth)return(0,y.popSchemaStack)(W,T),(0,y.getResultForCircular)((0,A.inferType)(a));if(a.$ref){if(!b)throw new Error("Your schema contains $ref. You must provide full specification in the third parameter.");let S=decodeURIComponent(a.$ref);S.startsWith("#")&&(S=S.substring(1));let G=N.default.get(b,S),X;if(q[S]!==!0){q[S]=!0;let tt=m(G,x,b,T);if(x.format==="xml"){let Z=S.split("/").pop(),z=v(v({},T),{},{propertyName:T?.propertyName||Z}),{propertyName:nt,value:ut}=(0,y.applyXMLAttributes)(tt,G,z);X=v(v({},tt),{},{value:{[nt||"root"]:ut}})}else X=tt;q[S]=!1}else{let tt=(0,A.inferType)(G);X=(0,y.getResultForCircular)(tt)}return(0,y.popSchemaStack)(W,T),X}if(a.example!==void 0)return(0,y.popSchemaStack)(W,T),{value:a.example,readOnly:a.readOnly,writeOnly:a.writeOnly,type:a.type};if(a.allOf!==void 0)return(0,y.popSchemaStack)(W,T),f(a)||(0,h.allOfSample)(v(v({},a),{},{allOf:void 0}),a.allOf,x,b,T);if(a.oneOf&&a.oneOf.length){a.anyOf&&(x.quiet||console.warn("oneOf and anyOf are not supported on the same level. Skipping anyOf")),(0,y.popSchemaStack)(W,T);let S=Object.assign({readOnly:a.readOnly,writeOnly:a.writeOnly},a.oneOf[0]);return H(a,S)}if(a.anyOf&&a.anyOf.length){(0,y.popSchemaStack)(W,T);let S=Object.assign({readOnly:a.readOnly,writeOnly:a.writeOnly},a.anyOf[0]);return H(a,S)}if(a.if&&a.then){(0,y.popSchemaStack)(W,T);let{if:S,then:G}=a,X=$(a,D);return m((0,y.mergeDeep)(X,S,G),x,b,T)}let B=K(a),Q=null;if(B===void 0){B=null,Q=a.type,Array.isArray(Q)&&a.type.length>0&&(Q=a.type[0]),Q||(Q=(0,A.inferType)(a));let S=I._samplers[Q];S&&(B=S(a,x,b,T))}return(0,y.popSchemaStack)(W,T),{value:B,readOnly:a.readOnly,writeOnly:a.writeOnly,type:Q};function H(S,G){let X=f(S);if(X!==void 0)return X;let tt=m(v(v({},S),{},{oneOf:void 0,anyOf:void 0}),x,b,T),Z=m(G,x,b,T);if(typeof tt.value=="object"&&typeof Z.value=="object"){let z=(0,y.mergeDeep)(tt.value,Z.value);return v(v({},Z),{},{value:z})}return Z}}},{"./allOf":4,"./infer":5,"./openapi-sampler":6,"./utils":15,"json-pointer":3}],15:[function(_,R,w){"use strict";Object.defineProperty(w,"__esModule",{value:!0}),w.SKIP_SYMBOL=void 0,w.applyXMLAttributes=W,w.ensureMinLength=l,w.getResultForCircular=P,w.getXMLAttributes=F,w.mergeDeep=c,w.popSchemaStack=E,w.toRFCDateTime=$,w.uuid=v;function I(f,m){var a=Object.keys(f);if(Object.getOwnPropertySymbols){var x=Object.getOwnPropertySymbols(f);m&&(x=x.filter(function(b){return Object.getOwnPropertyDescriptor(f,b).enumerable})),a.push.apply(a,x)}return a}function h(f){for(var m=1;m<arguments.length;m++){var a=arguments[m]!=null?arguments[m]:{};m%2?I(Object(a),!0).forEach(function(x){A(f,x,a[x])}):Object.getOwnPropertyDescriptors?Object.defineProperties(f,Object.getOwnPropertyDescriptors(a)):I(Object(a)).forEach(function(x){Object.defineProperty(f,x,Object.getOwnPropertyDescriptor(a,x))})}return f}function A(f,m,a){return(m=y(m))in f?Object.defineProperty(f,m,{value:a,enumerable:!0,configurable:!0,writable:!0}):f[m]=a,f}function y(f){var m=N(f,"string");return typeof m=="symbol"?m:m+""}function N(f,m){if(typeof f!="object"||!f)return f;var a=f[Symbol.toPrimitive];if(a!==void 0){var x=a.call(f,m||"default");if(typeof x!="object")return x;throw new TypeError("@@toPrimitive must return a primitive value.")}return(m==="string"?String:Number)(f)}let D=w.SKIP_SYMBOL=Symbol("skip");function j(f){return f<10?"0"+f:f}function $(f,m,a,x){var b=a?"":f.getUTCFullYear()+"-"+j(f.getUTCMonth()+1)+"-"+j(f.getUTCDate());return m||(b+="T"+j(f.getUTCHours())+":"+j(f.getUTCMinutes())+":"+j(f.getUTCSeconds())+(x?"."+(f.getUTCMilliseconds()/1e3).toFixed(3).slice(2,5):"")+"Z"),b}function l(f,m){return m>f.length?f.repeat(Math.trunc(m/f.length)+1).substring(0,m):f}function c(){let f=b=>b&&typeof b=="object";for(var m=arguments.length,a=new Array(m),x=0;x<m;x++)a[x]=arguments[x];return a.reduce((b,T)=>(Object.keys(T||{}).forEach(B=>{let Q=b[B],H=T[B];f(Q)&&f(H)?b[B]=c(Q,H):b[B]=H}),b),Array.isArray(a[a.length-1])?[]:{})}function v(f){var m=U(f),a=K(m,m,m,m),x="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,b=>{var T=a()*16%16|0;return(b=="x"?T:T&3|8).toString(16)});return x}function P(f){return{value:f==="object"?{}:f==="array"?[]:void 0}}function E(f,m){m&&f.pop()}function F(f){var m,a,x,b,T,B,Q;return{name:(f==null||(m=f.xml)===null||m===void 0?void 0:m.name)||"",prefix:(f==null||(a=f.xml)===null||a===void 0?void 0:a.prefix)||"",namespace:(f==null||(x=f.xml)===null||x===void 0?void 0:x.namespace)||null,attribute:(b=f==null||(T=f.xml)===null||T===void 0?void 0:T.attribute)!==null&&b!==void 0?b:!1,wrapped:(B=f==null||(Q=f.xml)===null||Q===void 0?void 0:Q.wrapped)!==null&&B!==void 0?B:!1}}function q(f){let m=f?.xml;return m!=null&&m.nodeType?m.nodeType:m?.attribute===!0?"attribute":m?.wrapped===!0&&f?.type==="array"?"element":f!=null&&f.$ref||f!=null&&f.$dynamicRef||f?.type==="array"||f!=null&&f.oneOf||f!=null&&f.anyOf||f!=null&&f.allOf?"none":"element"}function W(f){let m=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{value:x}=f,{propertyName:b}=a,{name:T,prefix:B,namespace:Q}=F(m),H=q(m),S=T||b?"".concat(B?B+":":"").concat(T||b):null,G=typeof x=="object"?Array.isArray(x)?[...x]:h({},x):x;switch(H){case"attribute":S&&(S="$".concat(S));break;case"text":S="#text";break;case"cdata":S="#cdata";break;case"none":if(m.type==="array"){if(S=null,m.example!==void 0){var X;S=((X=m.items)===null||X===void 0||(X=X.xml)===null||X===void 0?void 0:X.name)||S}}else S=null;break;default:m.type==="array"&&Array.isArray(G)&&(G={[S]:[...G]});break}return Q&&H!=="text"&&H!=="cdata"&&H!=="none"&&(typeof G=="object"?G["$xmlns".concat(B?":"+B:"")]=Q:G={["$xmlns".concat(B?":"+B:"")]:Q,"#text":G}),{propertyName:S,value:G}}function U(f){var m=0;if(f.length==0)return m;for(var a=0;a<f.length;a++){var x=f.charCodeAt(a);m=(m<<5)-m+x,m=m&m}return m}function K(f,m,a,x){return function(){f|=0,m|=0,a|=0,x|=0;var b=f-(m<<27|m>>>5)|0;return f=m^(a<<17|a>>>15),m=a+x|0,a=x+b|0,x=f+b|0,(x>>>0)/4294967296}}},{}]},{},[6])(6)})});var zt=Nt((Ke,Kt)=>{"use strict";Kt.exports=(Y,C=process.argv)=>{let J=Y.startsWith("-")?"":Y.length===1?"-":"--",_=C.indexOf(J+Y),R=C.indexOf("--");return _!==-1&&(R===-1||_<R)}});var We=Nt((ze,Zt)=>{"use strict";var Ge=bt("os"),Jt=bt("tty"),ft=zt(),{env:it}=process,mt;ft("no-color")||ft("no-colors")||ft("color=false")||ft("color=never")?mt=0:(ft("color")||ft("colors")||ft("color=true")||ft("color=always"))&&(mt=1);"FORCE_COLOR"in it&&(it.FORCE_COLOR==="true"?mt=1:it.FORCE_COLOR==="false"?mt=0:mt=it.FORCE_COLOR.length===0?1:Math.min(parseInt(it.FORCE_COLOR,10),3));function It(Y){return Y===0?!1:{level:Y,hasBasic:!0,has256:Y>=2,has16m:Y>=3}}function Dt(Y,C){if(mt===0)return 0;if(ft("color=16m")||ft("color=full")||ft("color=truecolor"))return 3;if(ft("color=256"))return 2;if(Y&&!C&&mt===void 0)return 0;let J=mt||0;if(it.TERM==="dumb")return J;if(process.platform==="win32"){let _=Ge.release().split(".");return Number(_[0])>=10&&Number(_[2])>=10586?Number(_[2])>=14931?3:2:1}if("CI"in it)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some(_=>_ in it)||it.CI_NAME==="codeship"?1:J;if("TEAMCITY_VERSION"in it)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(it.TEAMCITY_VERSION)?1:0;if(it.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in it){let _=parseInt((it.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(it.TERM_PROGRAM){case"iTerm.app":return _>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(it.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(it.TERM)||"COLORTERM"in it?1:J}function Be(Y){let C=Dt(Y,Y&&Y.isTTY);return It(C)}Zt.exports={supportsColor:Be,stdout:It(Dt(!0,Jt.isatty(1))),stderr:It(Dt(!0,Jt.isatty(2)))}});export{We as a,Fe as b,Ue as c};
|
|
13
|
+
`):(this.indentate=function(){return""},this.tagEndChar=">",this.newLine="")}function Me(r,t,e,i){let n=this.extractAttributes(r);if(i.push(t,n),this.checkStopNode(i)){let u=this.buildRawContent(r),s=this.buildAttributesForStopNode(r);return i.pop(),this.buildObjectNode(u,t,s,e)}let o=this.j2x(r,e+1,i);return i.pop(),r[this.options.textNodeName]!==void 0&&Object.keys(r).length===1?this.buildTextValNode(r[this.options.textNodeName],t,o.attrStr,e,i):this.buildObjectNode(o.val,t,o.attrStr,e)}function Ie(r){return this.options.indentBy.repeat(r)}function De(r){return!(!r.startsWith(this.options.attributeNamePrefix)||r===this.options.textNodeName)&&r.substr(this.attrPrefixLen)}pt.prototype.build=function(r){if(this.options.preserveOrder)return Pe(r,this.options);{Array.isArray(r)&&this.options.arrayNodeName&&this.options.arrayNodeName.length>1&&(r={[this.options.arrayNodeName]:r});let t=new Ot;return this.j2x(r,0,t).val}},pt.prototype.j2x=function(r,t,e){let i="",n="";if(this.options.maxNestedTags&&e.getDepth()>=this.options.maxNestedTags)throw new Error("Maximum nested tags exceeded");let o=this.options.jPath?e.toString():e,u=this.checkStopNode(e);for(let s in r)if(Object.prototype.hasOwnProperty.call(r,s))if(r[s]===void 0)this.isAttribute(s)&&(n+="");else if(r[s]===null)this.isAttribute(s)||s===this.options.cdataPropName?n+="":s[0]==="?"?n+=this.indentate(t)+"<"+s+"?"+this.tagEndChar:n+=this.indentate(t)+"<"+s+"/"+this.tagEndChar;else if(r[s]instanceof Date)n+=this.buildTextValNode(r[s],s,"",t,e);else if(typeof r[s]!="object"){let d=this.isAttribute(s);if(d&&!this.ignoreAttributesFn(d,o))i+=this.buildAttrPairStr(d,""+r[s],u);else if(!d)if(s===this.options.textNodeName){let p=this.options.tagValueProcessor(s,""+r[s]);n+=this.replaceEntitiesValue(p)}else{e.push(s);let p=this.checkStopNode(e);if(e.pop(),p){let g=""+r[s];n+=g===""?this.indentate(t)+"<"+s+this.closeTag(s)+this.tagEndChar:this.indentate(t)+"<"+s+">"+g+"</"+s+this.tagEndChar}else n+=this.buildTextValNode(r[s],s,"",t,e)}}else if(Array.isArray(r[s])){let d=r[s].length,p="",g="";for(let O=0;O<d;O++){let M=r[s][O];if(M!==void 0)if(M===null)s[0]==="?"?n+=this.indentate(t)+"<"+s+"?"+this.tagEndChar:n+=this.indentate(t)+"<"+s+"/"+this.tagEndChar;else if(typeof M=="object")if(this.options.oneListGroup){e.push(s);let L=this.j2x(M,t+1,e);e.pop(),p+=L.val,this.options.attributesGroupName&&M.hasOwnProperty(this.options.attributesGroupName)&&(g+=L.attrStr)}else p+=this.processTextOrObjNode(M,s,t,e);else if(this.options.oneListGroup){let L=this.options.tagValueProcessor(s,M);L=this.replaceEntitiesValue(L),p+=L}else{e.push(s);let L=this.checkStopNode(e);if(e.pop(),L){let k=""+M;p+=k===""?this.indentate(t)+"<"+s+this.closeTag(s)+this.tagEndChar:this.indentate(t)+"<"+s+">"+k+"</"+s+this.tagEndChar}else p+=this.buildTextValNode(M,s,"",t,e)}}this.options.oneListGroup&&(p=this.buildObjectNode(p,s,g,t)),n+=p}else if(this.options.attributesGroupName&&s===this.options.attributesGroupName){let d=Object.keys(r[s]),p=d.length;for(let g=0;g<p;g++)i+=this.buildAttrPairStr(d[g],""+r[s][d[g]],u)}else n+=this.processTextOrObjNode(r[s],s,t,e);return{attrStr:i,val:n}},pt.prototype.buildAttrPairStr=function(r,t,e){return e||(t=this.options.attributeValueProcessor(r,""+t),t=this.replaceEntitiesValue(t)),this.options.suppressBooleanAttributes&&t==="true"?" "+r:" "+r+'="'+t+'"'},pt.prototype.extractAttributes=function(r){if(!r||typeof r!="object")return null;let t={},e=!1;if(this.options.attributesGroupName&&r[this.options.attributesGroupName]){let i=r[this.options.attributesGroupName];for(let n in i)Object.prototype.hasOwnProperty.call(i,n)&&(t[n.startsWith(this.options.attributeNamePrefix)?n.substring(this.options.attributeNamePrefix.length):n]=i[n],e=!0)}else for(let i in r){if(!Object.prototype.hasOwnProperty.call(r,i))continue;let n=this.isAttribute(i);n&&(t[n]=r[i],e=!0)}return e?t:null},pt.prototype.buildRawContent=function(r){if(typeof r=="string")return r;if(typeof r!="object"||r===null)return String(r);if(r[this.options.textNodeName]!==void 0)return r[this.options.textNodeName];let t="";for(let e in r){if(!Object.prototype.hasOwnProperty.call(r,e)||this.isAttribute(e)||this.options.attributesGroupName&&e===this.options.attributesGroupName)continue;let i=r[e];if(e===this.options.textNodeName)t+=i;else if(Array.isArray(i)){for(let n of i)if(typeof n=="string"||typeof n=="number")t+=`<${e}>${n}</${e}>`;else if(typeof n=="object"&&n!==null){let o=this.buildRawContent(n),u=this.buildAttributesForStopNode(n);t+=o===""?`<${e}${u}/>`:`<${e}${u}>${o}</${e}>`}}else if(typeof i=="object"&&i!==null){let n=this.buildRawContent(i),o=this.buildAttributesForStopNode(i);t+=n===""?`<${e}${o}/>`:`<${e}${o}>${n}</${e}>`}else t+=`<${e}>${i}</${e}>`}return t},pt.prototype.buildAttributesForStopNode=function(r){if(!r||typeof r!="object")return"";let t="";if(this.options.attributesGroupName&&r[this.options.attributesGroupName]){let e=r[this.options.attributesGroupName];for(let i in e){if(!Object.prototype.hasOwnProperty.call(e,i))continue;let n=i.startsWith(this.options.attributeNamePrefix)?i.substring(this.options.attributeNamePrefix.length):i,o=e[i];o===!0&&this.options.suppressBooleanAttributes?t+=" "+n:t+=" "+n+'="'+o+'"'}}else for(let e in r){if(!Object.prototype.hasOwnProperty.call(r,e))continue;let i=this.isAttribute(e);if(i){let n=r[e];n===!0&&this.options.suppressBooleanAttributes?t+=" "+i:t+=" "+i+'="'+n+'"'}}return t},pt.prototype.buildObjectNode=function(r,t,e,i){if(r==="")return t[0]==="?"?this.indentate(i)+"<"+t+e+"?"+this.tagEndChar:this.indentate(i)+"<"+t+e+this.closeTag(t)+this.tagEndChar;{let n="</"+t+this.tagEndChar,o="";return t[0]==="?"&&(o="?",n=""),!e&&e!==""||r.indexOf("<")!==-1?this.options.commentPropName!==!1&&t===this.options.commentPropName&&o.length===0?this.indentate(i)+`<!--${r}-->`+this.newLine:this.indentate(i)+"<"+t+e+o+this.tagEndChar+r+this.indentate(i)+n:this.indentate(i)+"<"+t+e+o+">"+r+n}},pt.prototype.closeTag=function(r){let t="";return this.options.unpairedTags.indexOf(r)!==-1?this.options.suppressUnpairedNode||(t="/"):t=this.options.suppressEmptyNode?"/":`></${r}`,t},pt.prototype.checkStopNode=function(r){if(!this.stopNodeExpressions||this.stopNodeExpressions.length===0)return!1;for(let t=0;t<this.stopNodeExpressions.length;t++)if(r.matches(this.stopNodeExpressions[t]))return!0;return!1},pt.prototype.buildTextValNode=function(r,t,e,i,n){if(this.options.cdataPropName!==!1&&t===this.options.cdataPropName){let o=String(r).replace(/\]\]>/g,"]]]]><![CDATA[>");return this.indentate(i)+`<![CDATA[${o}]]>`+this.newLine}if(this.options.commentPropName!==!1&&t===this.options.commentPropName){let o=String(r).replace(/--/g,"- -").replace(/-$/,"- ");return this.indentate(i)+`<!--${o}-->`+this.newLine}if(t[0]==="?")return this.indentate(i)+"<"+t+e+"?"+this.tagEndChar;{let o=this.options.tagValueProcessor(t,r);return o=this.replaceEntitiesValue(o),o===""?this.indentate(i)+"<"+t+e+this.closeTag(t)+this.tagEndChar:this.indentate(i)+"<"+t+e+">"+o+"</"+t+this.tagEndChar}},pt.prototype.replaceEntitiesValue=function(r){if(r&&r.length>0&&this.options.processEntities)for(let t=0;t<this.options.entities.length;t++){let e=this.options.entities[t];r=r.replace(e.regex,e.val)}return r};let $e=pt,Le={validate:c};R.exports=h})()},{}],2:[function(_,R,w){var I=Object.prototype.hasOwnProperty,h=Object.prototype.toString;R.exports=function(y,N,D){if(h.call(N)!=="[object Function]")throw new TypeError("iterator must be a function");var j=y.length;if(j===+j)for(var $=0;$<j;$++)N.call(D,y[$],$,y);else for(var l in y)I.call(y,l)&&N.call(D,y[l],l,y)}},{}],3:[function(_,R,w){"use strict";var I=_("foreach");R.exports=h;function h(A,y,N){if(arguments.length===3)return h.set(A,y,N);if(arguments.length===2)return h.get(A,y);var D=h.bind(h,A);for(var j in h)h.hasOwnProperty(j)&&(D[j]=h[j].bind(D,A));return D}h.get=function(y,N){for(var D=Array.isArray(N)?N:h.parse(N),j=0;j<D.length;++j){var $=D[j];if(!(typeof y=="object"&&$ in y))throw new Error("Invalid reference token: "+$);y=y[$]}return y},h.set=function(y,N,D){var j=Array.isArray(N)?N:h.parse(N),$=j[0];if(j.length===0)throw Error("Can not set the root object");for(var l=0;l<j.length-1;++l){var c=j[l];typeof c!="string"&&typeof c!="number"&&(c=String(c)),!(c==="__proto__"||c==="constructor"||c==="prototype")&&(c==="-"&&Array.isArray(y)&&(c=y.length),$=j[l+1],c in y||($.match(/^(\d+|-)$/)?y[c]=[]:y[c]={}),y=y[c])}return $==="-"&&Array.isArray(y)&&($=y.length),y[$]=D,this},h.remove=function(A,y){var N=Array.isArray(y)?y:h.parse(y),D=N[N.length-1];if(D===void 0)throw new Error('Invalid JSON pointer for remove: "'+y+'"');var j=h.get(A,N.slice(0,-1));if(Array.isArray(j)){var $=+D;if(D===""&&isNaN($))throw new Error('Invalid array index: "'+D+'"');Array.prototype.splice.call(j,$,1)}else delete j[D]},h.dict=function(y,N){var D={};return h.walk(y,function(j,$){D[$]=j},N),D},h.walk=function(y,N,D){var j=[];D=D||function($){var l=Object.prototype.toString.call($);return l==="[object Object]"||l==="[object Array]"},(function $(l){I(l,function(c,v){j.push(String(v)),D(c)?$(c):N(c,h.compile(j)),j.pop()})})(y)},h.has=function(y,N){try{h.get(y,N)}catch{return!1}return!0},h.escape=function(y){return y.toString().replace(/~/g,"~0").replace(/\//g,"~1")},h.unescape=function(y){return y.replace(/~1/g,"/").replace(/~0/g,"~")},h.parse=function(y){if(y==="")return[];if(y.charAt(0)!=="/")throw new Error("Invalid JSON pointer: "+y);return y.substring(1).split(/\//).map(h.unescape)},h.compile=function(y){return y.length===0?"":"/"+y.map(h.escape).join("/")}},{foreach:2}],4:[function(_,R,w){"use strict";Object.defineProperty(w,"__esModule",{value:!0}),w.allOfSample=$;var I=_("./traverse"),h=_("./utils");function A(l,c){var v=Object.keys(l);if(Object.getOwnPropertySymbols){var P=Object.getOwnPropertySymbols(l);c&&(P=P.filter(function(E){return Object.getOwnPropertyDescriptor(l,E).enumerable})),v.push.apply(v,P)}return v}function y(l){for(var c=1;c<arguments.length;c++){var v=arguments[c]!=null?arguments[c]:{};c%2?A(Object(v),!0).forEach(function(P){N(l,P,v[P])}):Object.getOwnPropertyDescriptors?Object.defineProperties(l,Object.getOwnPropertyDescriptors(v)):A(Object(v)).forEach(function(P){Object.defineProperty(l,P,Object.getOwnPropertyDescriptor(v,P))})}return l}function N(l,c,v){return(c=D(c))in l?Object.defineProperty(l,c,{value:v,enumerable:!0,configurable:!0,writable:!0}):l[c]=v,l}function D(l){var c=j(l,"string");return typeof c=="symbol"?c:c+""}function j(l,c){if(typeof l!="object"||!l)return l;var v=l[Symbol.toPrimitive];if(v!==void 0){var P=v.call(l,c||"default");if(typeof P!="object")return P;throw new TypeError("@@toPrimitive must return a primitive value.")}return(c==="string"?String:Number)(l)}function $(l,c,v,P,E){let F=(0,I.traverse)(l,v,P),q=[];for(let W of c){let{type:U,readOnly:K,writeOnly:f,value:m}=(0,I.traverse)(y({type:F.type},W),v,P,y(y({},E),{},{isAllOfChild:!0}));F.type&&U&&U!==F.type&&(console.warn("allOf: schemas with different types can't be merged"),F.type=U),F.type=F.type||U,F.readOnly=F.readOnly||K,F.writeOnly=F.writeOnly||f,m!=null&&q.push(m)}if(F.type==="object"){F.value=(0,h.mergeDeep)(F.value||{},...q.filter(W=>typeof W=="object"));for(let W in F.value)F.value[W]===h.SKIP_SYMBOL&&delete F.value[W];return F}else{F.type==="array"&&(v.quiet||console.warn('OpenAPI Sampler: found allOf with "array" type. Result may be incorrect'));let W=q[q.length-1];return F.value=W??F.value,F}}},{"./traverse":14,"./utils":15}],5:[function(_,R,w){"use strict";Object.defineProperty(w,"__esModule",{value:!0}),w.inferType=h;let I={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 h(A){if(A.type!==void 0)return Array.isArray(A.type)?A.type.length===0?null:A.type[0]:A.type;let y=Object.keys(I);for(var N=0;N<y.length;N++){let D=y[N],j=I[D];if(A[D]!==void 0)return j}return null}},{}],6:[function(_,R,w){"use strict";Object.defineProperty(w,"__esModule",{value:!0}),w._registerSampler=l,w._samplers=void 0,Object.defineProperty(w,"inferType",{enumerable:!0,get:function(){return y.inferType}}),w.sample=$;var I=_("./traverse"),h=_("./samplers/index"),A=_("fast-xml-parser"),y=_("./infer"),N=w._samplers={};let D={skipReadOnly:!1,maxSampleDepth:15};function j(c,v){if(!c)throw new Error("Unknown format output for building XML.");if(Array.isArray(c)||Object.keys(c).length>1){var P;c={[(v==null||(P=v.xml)===null||P===void 0?void 0:P.name)||"root"]:c}}return new A.XMLBuilder({ignoreAttributes:!1,format:!0,attributeNamePrefix:"$",textNodeName:"#text",cdataPropName:"#cdata"}).build(c)}function $(c,v,P){let E=Object.assign({},D,v);(0,I.clearCache)();let F=(0,I.traverse)(c,E,P).value;return E?.format==="xml"?j(F,c):F}function l(c,v){N[c]=v}l("array",h.sampleArray),l("boolean",h.sampleBoolean),l("integer",h.sampleNumber),l("number",h.sampleNumber),l("object",h.sampleObject),l("string",h.sampleString)},{"./infer":5,"./samplers/index":9,"./traverse":14,"fast-xml-parser":1}],7:[function(_,R,w){"use strict";Object.defineProperty(w,"__esModule",{value:!0}),w.sampleArray=$;var I=_("../traverse"),h=_("../utils");function A(l,c){var v=Object.keys(l);if(Object.getOwnPropertySymbols){var P=Object.getOwnPropertySymbols(l);c&&(P=P.filter(function(E){return Object.getOwnPropertyDescriptor(l,E).enumerable})),v.push.apply(v,P)}return v}function y(l){for(var c=1;c<arguments.length;c++){var v=arguments[c]!=null?arguments[c]:{};c%2?A(Object(v),!0).forEach(function(P){N(l,P,v[P])}):Object.getOwnPropertyDescriptors?Object.defineProperties(l,Object.getOwnPropertyDescriptors(v)):A(Object(v)).forEach(function(P){Object.defineProperty(l,P,Object.getOwnPropertyDescriptor(v,P))})}return l}function N(l,c,v){return(c=D(c))in l?Object.defineProperty(l,c,{value:v,enumerable:!0,configurable:!0,writable:!0}):l[c]=v,l}function D(l){var c=j(l,"string");return typeof c=="symbol"?c:c+""}function j(l,c){if(typeof l!="object"||!l)return l;var v=l[Symbol.toPrimitive];if(v!==void 0){var P=v.call(l,c||"default");if(typeof P!="object")return P;throw new TypeError("@@toPrimitive must return a primitive value.")}return(c==="string"?String:Number)(l)}function $(l){let c=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},v=arguments.length>2?arguments[2]:void 0,P=arguments.length>3?arguments[3]:void 0,E=P&&P.depth||1,F=Math.min(l.maxItems!=null?l.maxItems:1/0,l.minItems||1),q=l.prefixItems||l.items||l.contains;Array.isArray(q)&&(F=Math.max(F,q.length));let W=f=>Array.isArray(q)?q[f]||{}:q||{},U=[];if(!q)return U;for(let f=0;f<F;f++){let m=W(f),{value:a}=(0,I.traverse)(m,c,v,{depth:E+1});if(c?.format==="xml"){let{value:x,propertyName:b}=(0,h.applyXMLAttributes)({value:a},m,P);if(b){var K;(K=U)!==null&&K!==void 0&&K[b]||(U=y(y({},U),{},{[b]:[]})),U[b].push(x)}else U=y(y({},U),x)}else U.push(a)}if(c?.format==="xml"&&E===1){let{value:f,propertyName:m}=(0,h.applyXMLAttributes)({value:null},l,P);m&&(f?U=Array.isArray(U)?{[m]:y(y({},f),U.map(a=>({"#text":y({},a)})))}:{[m]:y(y({},U),f)}:U={[m]:U})}return U}},{"../traverse":14,"../utils":15}],8:[function(_,R,w){"use strict";Object.defineProperty(w,"__esModule",{value:!0}),w.sampleBoolean=I;function I(h){return!0}},{}],9:[function(_,R,w){"use strict";Object.defineProperty(w,"__esModule",{value:!0}),Object.defineProperty(w,"sampleArray",{enumerable:!0,get:function(){return I.sampleArray}}),Object.defineProperty(w,"sampleBoolean",{enumerable:!0,get:function(){return h.sampleBoolean}}),Object.defineProperty(w,"sampleNumber",{enumerable:!0,get:function(){return A.sampleNumber}}),Object.defineProperty(w,"sampleObject",{enumerable:!0,get:function(){return y.sampleObject}}),Object.defineProperty(w,"sampleString",{enumerable:!0,get:function(){return N.sampleString}});var I=_("./array"),h=_("./boolean"),A=_("./number"),y=_("./object"),N=_("./string")},{"./array":7,"./boolean":8,"./number":10,"./object":11,"./string":13}],10:[function(_,R,w){"use strict";Object.defineProperty(w,"__esModule",{value:!0}),w.sampleNumber=I;function I(h){let A=0;if(h.type==="number"&&(h.format==="float"||h.format==="double")&&(A=.1),typeof h.exclusiveMinimum=="boolean"||typeof h.exclusiveMaximum=="boolean"){if(Number.isFinite(h.maximum)&&Number.isFinite(h.minimum))return A=h.exclusiveMinimum?Math.floor(h.minimum)+1:h.minimum,(h.exclusiveMaximum&&A>=h.maximum||!h.exclusiveMaximum&&A>h.maximum)&&(A=(h.maximum+h.minimum)/2),A;if(Number.isFinite(h.minimum))return h.exclusiveMinimum?Math.floor(h.minimum)+1:h.minimum;if(Number.isFinite(h.maximum))return h.exclusiveMaximum?h.maximum>0?0:Math.floor(h.maximum)-1:h.maximum>0?0:h.maximum}else{if(Number.isFinite(h.minimum))return h.minimum;Number.isFinite(h.exclusiveMinimum)?(A=Math.floor(h.exclusiveMinimum)+1,A===h.exclusiveMaximum&&(A=(A+Math.floor(h.exclusiveMaximum)-1)/2)):Number.isFinite(h.exclusiveMaximum)?A=Math.floor(h.exclusiveMaximum)-1:Number.isFinite(h.maximum)&&(A=h.maximum)}return A}},{}],11:[function(_,R,w){"use strict";Object.defineProperty(w,"__esModule",{value:!0}),w.sampleObject=$;var I=_("../traverse"),h=_("../utils");function A(l,c){var v=Object.keys(l);if(Object.getOwnPropertySymbols){var P=Object.getOwnPropertySymbols(l);c&&(P=P.filter(function(E){return Object.getOwnPropertyDescriptor(l,E).enumerable})),v.push.apply(v,P)}return v}function y(l){for(var c=1;c<arguments.length;c++){var v=arguments[c]!=null?arguments[c]:{};c%2?A(Object(v),!0).forEach(function(P){N(l,P,v[P])}):Object.getOwnPropertyDescriptors?Object.defineProperties(l,Object.getOwnPropertyDescriptors(v)):A(Object(v)).forEach(function(P){Object.defineProperty(l,P,Object.getOwnPropertyDescriptor(v,P))})}return l}function N(l,c,v){return(c=D(c))in l?Object.defineProperty(l,c,{value:v,enumerable:!0,configurable:!0,writable:!0}):l[c]=v,l}function D(l){var c=j(l,"string");return typeof c=="symbol"?c:c+""}function j(l,c){if(typeof l!="object"||!l)return l;var v=l[Symbol.toPrimitive];if(v!==void 0){var P=v.call(l,c||"default");if(typeof P!="object")return P;throw new TypeError("@@toPrimitive must return a primitive value.")}return(c==="string"?String:Number)(l)}function $(l){let c=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},v=arguments.length>2?arguments[2]:void 0,P=arguments.length>3?arguments[3]:void 0,E={},F=P&&P.depth||1;if(l&&typeof l.properties=="object"){let q=Array.isArray(l.required)?l.required:[],W={};for(let U of q)W[U]=!0;Object.keys(l.properties).forEach(U=>{if(c.skipNonRequired&&!W.hasOwnProperty(U))return;let K=(0,I.traverse)(l.properties[U],c,v,{propertyName:U,depth:F+1});if(c.skipReadOnly&&K.readOnly){P!=null&&P.isAllOfChild&&(E[U]=h.SKIP_SYMBOL);return}if(c.skipWriteOnly&&K.writeOnly){P!=null&&P.isAllOfChild&&(E[U]=h.SKIP_SYMBOL);return}if(c?.format==="xml"){let{propertyName:f,value:m}=(0,h.applyXMLAttributes)(K,l.properties[U],{propertyName:U});f?E[f]=m:m!==null&&typeof m=="object"&&(E=y(y({},E),m))}else E[U]=K.value})}if(l&&typeof l.additionalProperties=="object"){let q=l.additionalProperties["x-additionalPropertiesName"]||"property";E["".concat(String(q),"1")]=(0,I.traverse)(l.additionalProperties,c,v,{depth:F+1}).value,E["".concat(String(q),"2")]=(0,I.traverse)(l.additionalProperties,c,v,{depth:F+1}).value}if(l&&typeof l.properties=="object"&&l.maxProperties!==void 0&&Object.keys(E).length>l.maxProperties){let q={},W=0;(Array.isArray(l.required)?l.required:[]).forEach(K=>{E[K]!==void 0&&(q[K]=E[K],W++)}),Object.keys(E).forEach(K=>{W<l.maxProperties&&!q.hasOwnProperty(K)&&(q[K]=E[K],W++)}),E=q}return E}},{"../traverse":14,"../utils":15}],12:[function(_,R,w){"use strict";Object.defineProperty(w,"__esModule",{value:!0}),w.regexSample=y;function I(){return!0}function h(N,D){return N}function A(N,D,j){let $=1;if(N)switch(N){case"?":{$=I()?0:1;break}case"*":{$=h(0,8);break}case"+":{$=h(1,8);break}default:throw new Error("Unknown quantifier symbol provided.")}else D!=null&&j!=null?$=h(parseInt(D),parseInt(j)):D!=null&&j==null&&($=parseInt(D));return $}function y(N){let D=!1;if(N instanceof RegExp){var j,$;D=N.flags.includes("i"),N=N.toString(),N=(j=($=N.match(/\/(.+?)\//))===null||$===void 0?void 0:$[1])!==null&&j!==void 0?j:""}N=N.replace(/^(\^)?(.*?)(\$)?$/,"$2");let l,c,v,P=/([.A-Za-z0-9])(?:\{(\d+)(?:\,(\d+)|)\}|(\?|\*|\+))(?![^[]*]|[^{]*})/,E=N.match(P);for(;E!=null;){let K=E[2],f=E[3],m=E[4];v=A(m,K,f),N=N.slice(0,E.index)+E[1].repeat(v)+N.slice(E.index+E[0].length),E=N.match(P)}let F=/(\d-\d|\w-\w|\d|\w|[-!@#$&()`.+,/"])/,q=/\[(\^|)(-|)(.+?)\](?:\{(\d+)(?:\,(\d+)|)\}|(\?|\*|\+)|)/;for(E=N.match(q);E!=null;){let K=E[1]==="^",f=E[2]==="-",m=E[4],a=E[5],x=E[6],b=[],T=E[3],B=T.match(F);for(f&&b.push(45);B!=null;){if(B[0].indexOf("-")===-1)D&&isNaN(Number(B[0]))?(b.push(B[0].toUpperCase().charCodeAt(0)),b.push(B[0].toLowerCase().charCodeAt(0))):b.push(B[0].charCodeAt(0));else{let H=B[0].split("-").map(S=>S.charCodeAt(0));if(l=H[0],c=H[1],l>c)throw new Error("Character range provided is out of order.");for(let S=l;S<=c;S++)if(D&&isNaN(Number(String.fromCharCode(S)))){let G=String.fromCharCode(S);b.push(G.toUpperCase().charCodeAt(0)),b.push(G.toLowerCase().charCodeAt(0))}else b.push(S)}T=T.substring(B[0].length),B=T.match(F)}if(v=A(x,m,a),K){let H=-1;for(let S=48;S<=57;S++){if(H=b.indexOf(S),H>-1){b.splice(H,1);continue}b.push(S)}for(let S=65;S<=90;S++){if(H=b.indexOf(S),H>-1){b.splice(H,1);continue}b.push(S)}for(let S=97;S<=122;S++){if(H=b.indexOf(S),H>-1){b.splice(H,1);continue}b.push(S)}}let Q=Array.from({length:v},()=>String.fromCharCode(b[h(0,b.length-1)])).join("");N=N.slice(0,E.index)+Q+N.slice(E.index+E[0].length),E=N.match(q)}let W=/(.)\{(\d+)\,(\d+)\}/;for(E=N.match(W);E!=null;){if(l=parseInt(E[2]),c=parseInt(E[3]),l>c)throw new Error("Numbers out of order in {} quantifier.");v=h(l,c),N=N.slice(0,E.index)+E[1].repeat(v)+N.slice(E.index+E[0].length),E=N.match(W)}let U=/(.)\{(\d+)\}/;for(E=N.match(U);E!=null;)v=parseInt(E[2]),N=N.slice(0,E.index)+E[1].repeat(v)+N.slice(E.index+E[0].length),E=N.match(U);return N}},{}],13:[function(_,R,w){"use strict";Object.defineProperty(w,"__esModule",{value:!0}),w.sampleString=H;var I=_("../utils"),h=A(_("./string-regex"));function A(S,G){if(typeof WeakMap=="function")var X=new WeakMap,tt=new WeakMap;return(A=function(Z,z){if(!z&&Z&&Z.__esModule)return Z;var nt,ut,gt={__proto__:null,default:Z};if(Z===null||typeof Z!="object"&&typeof Z!="function")return gt;if(nt=z?tt:X){if(nt.has(Z))return nt.get(Z);nt.set(Z,gt)}for(let ht in Z)ht!=="default"&&{}.hasOwnProperty.call(Z,ht)&&((ut=(nt=Object.defineProperty)&&Object.getOwnPropertyDescriptor(Z,ht))&&(ut.get||ut.set)?nt(gt,ht,ut):gt[ht]=Z[ht]);return gt})(S,G)}let y="qwerty!@#$%^123456";function N(){return"user@example.com"}function D(){return"\u043F\u043E\u0448\u0442\u0430@\u0443\u043A\u0440.\u043D\u0435\u0442"}function j(S,G){let X="pa$$word";return S>X.length&&(X+="_",X+=(0,I.ensureMinLength)(y,S-X.length).substring(0,S-X.length)),X}function $(S){let{min:G,max:X,omitTime:tt,omitDate:Z}=S,z=(0,I.toRFCDateTime)(new Date("2019-08-24T14:15:22.123Z"),tt,Z,!1);return z.length<G&&console.warn("Using minLength = ".concat(G,' is incorrect with format "date-time"')),X&&z.length>X&&console.warn("Using maxLength = ".concat(X,' is incorrect with format "date-time"')),z}function l(S,G){return $({min:S,max:G,omitTime:!1,omitDate:!1})}function c(S,G){return $({min:S,max:G,omitTime:!0,omitDate:!1})}function v(S,G){return $({min:S,max:G,omitTime:!1,omitDate:!0}).slice(1)}function P(S,G,X,tt){let Z=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1;if(tt&&Z)return h.regexSample(tt);let z=(0,I.ensureMinLength)("string",S);return G&&z.length>G&&(z=z.substring(0,G)),z}function E(){return"192.168.0.1"}function F(){return"2001:0db8:85a3:0000:0000:8a2e:0370:7334"}function q(){return"example.com"}function W(){return"\u043F\u0440\u0438\u043A\u043B\u0430\u0434.\u0443\u043A\u0440"}function U(){return"http://example.com"}function K(){return"../dictionary"}function f(){return"http://example.com/{endpoint}"}function m(){return"http://example.com/entity/1"}function a(){return"/entity/1"}function x(S,G,X){return(0,I.uuid)(X||"id")}function b(){return"/json/pointer"}function T(){return"1/relative/json/pointer"}function B(){return"/regex/"}let Q={email:N,"idn-email":D,password:j,"date-time":l,date:c,time:v,ipv4:E,ipv6:F,hostname:q,"idn-hostname":W,iri:m,"iri-reference":a,uri:U,"uri-reference":K,"uri-template":f,uuid:x,default:P,"json-pointer":b,"relative-json-pointer":T,regex:B};function H(S,G,X,tt){let Z=S.format||"default",z=Q[Z]||P,nt=tt&&tt.propertyName;return z(S.minLength||0,S.maxLength,nt,S.pattern,G?.enablePatterns)}},{"../utils":15,"./string-regex":12}],14:[function(_,R,w){"use strict";Object.defineProperty(w,"__esModule",{value:!0}),w.clearCache=U,w.traverse=m;var I=_("./openapi-sampler"),h=_("./allOf"),A=_("./infer"),y=_("./utils"),N=j(_("json-pointer"));let D=["if","then"];function j(a){return a&&a.__esModule?a:{default:a}}function $(a,x){if(a==null)return{};var b,T,B=l(a,x);if(Object.getOwnPropertySymbols){var Q=Object.getOwnPropertySymbols(a);for(T=0;T<Q.length;T++)b=Q[T],x.indexOf(b)===-1&&{}.propertyIsEnumerable.call(a,b)&&(B[b]=a[b])}return B}function l(a,x){if(a==null)return{};var b={};for(var T in a)if({}.hasOwnProperty.call(a,T)){if(x.indexOf(T)!==-1)continue;b[T]=a[T]}return b}function c(a,x){var b=Object.keys(a);if(Object.getOwnPropertySymbols){var T=Object.getOwnPropertySymbols(a);x&&(T=T.filter(function(B){return Object.getOwnPropertyDescriptor(a,B).enumerable})),b.push.apply(b,T)}return b}function v(a){for(var x=1;x<arguments.length;x++){var b=arguments[x]!=null?arguments[x]:{};x%2?c(Object(b),!0).forEach(function(T){P(a,T,b[T])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(b)):c(Object(b)).forEach(function(T){Object.defineProperty(a,T,Object.getOwnPropertyDescriptor(b,T))})}return a}function P(a,x,b){return(x=E(x))in a?Object.defineProperty(a,x,{value:b,enumerable:!0,configurable:!0,writable:!0}):a[x]=b,a}function E(a){var x=F(a,"string");return typeof x=="symbol"?x:x+""}function F(a,x){if(typeof a!="object"||!a)return a;var b=a[Symbol.toPrimitive];if(b!==void 0){var T=b.call(a,x||"default");if(typeof T!="object")return T;throw new TypeError("@@toPrimitive must return a primitive value.")}return(x==="string"?String:Number)(a)}let q={},W=[];function U(){q={},W=[]}function K(a){let x;return a.const!==void 0?x=a.const:a.examples!==void 0&&a.examples.length?x=a.examples[0]:a.enum!==void 0&&a.enum.length?x=a.enum[0]:a.default!==void 0&&(x=a.default),x}function f(a){let x=K(a);if(x!==void 0)return{value:x,readOnly:a.readOnly,writeOnly:a.writeOnly,type:null}}function m(a,x,b,T){if(T){if(W.includes(a))return(0,y.getResultForCircular)((0,A.inferType)(a));W.push(a)}if(T&&T.depth>x.maxSampleDepth)return(0,y.popSchemaStack)(W,T),(0,y.getResultForCircular)((0,A.inferType)(a));if(a.$ref){if(!b)throw new Error("Your schema contains $ref. You must provide full specification in the third parameter.");let S=decodeURIComponent(a.$ref);S.startsWith("#")&&(S=S.substring(1));let G=N.default.get(b,S),X;if(q[S]!==!0){q[S]=!0;let tt=m(G,x,b,T);if(x.format==="xml"){let Z=S.split("/").pop(),z=v(v({},T),{},{propertyName:T?.propertyName||Z}),{propertyName:nt,value:ut}=(0,y.applyXMLAttributes)(tt,G,z);X=v(v({},tt),{},{value:{[nt||"root"]:ut}})}else X=tt;q[S]=!1}else{let tt=(0,A.inferType)(G);X=(0,y.getResultForCircular)(tt)}return(0,y.popSchemaStack)(W,T),X}if(a.example!==void 0)return(0,y.popSchemaStack)(W,T),{value:a.example,readOnly:a.readOnly,writeOnly:a.writeOnly,type:a.type};if(a.allOf!==void 0)return(0,y.popSchemaStack)(W,T),f(a)||(0,h.allOfSample)(v(v({},a),{},{allOf:void 0}),a.allOf,x,b,T);if(a.oneOf&&a.oneOf.length){a.anyOf&&(x.quiet||console.warn("oneOf and anyOf are not supported on the same level. Skipping anyOf")),(0,y.popSchemaStack)(W,T);let S=Object.assign({readOnly:a.readOnly,writeOnly:a.writeOnly},a.oneOf[0]);return H(a,S)}if(a.anyOf&&a.anyOf.length){(0,y.popSchemaStack)(W,T);let S=Object.assign({readOnly:a.readOnly,writeOnly:a.writeOnly},a.anyOf[0]);return H(a,S)}if(a.if&&a.then){(0,y.popSchemaStack)(W,T);let{if:S,then:G}=a,X=$(a,D);return m((0,y.mergeDeep)(X,S,G),x,b,T)}let B=K(a),Q=null;if(B===void 0){B=null,Q=a.type,Array.isArray(Q)&&a.type.length>0&&(Q=a.type[0]),Q||(Q=(0,A.inferType)(a));let S=I._samplers[Q];S&&(B=S(a,x,b,T))}return(0,y.popSchemaStack)(W,T),{value:B,readOnly:a.readOnly,writeOnly:a.writeOnly,type:Q};function H(S,G){let X=f(S);if(X!==void 0)return X;let tt=m(v(v({},S),{},{oneOf:void 0,anyOf:void 0}),x,b,T),Z=m(G,x,b,T);if(typeof tt.value=="object"&&typeof Z.value=="object"){let z=(0,y.mergeDeep)(tt.value,Z.value);return v(v({},Z),{},{value:z})}return Z}}},{"./allOf":4,"./infer":5,"./openapi-sampler":6,"./utils":15,"json-pointer":3}],15:[function(_,R,w){"use strict";Object.defineProperty(w,"__esModule",{value:!0}),w.SKIP_SYMBOL=void 0,w.applyXMLAttributes=W,w.ensureMinLength=l,w.getResultForCircular=P,w.getXMLAttributes=F,w.mergeDeep=c,w.popSchemaStack=E,w.toRFCDateTime=$,w.uuid=v;function I(f,m){var a=Object.keys(f);if(Object.getOwnPropertySymbols){var x=Object.getOwnPropertySymbols(f);m&&(x=x.filter(function(b){return Object.getOwnPropertyDescriptor(f,b).enumerable})),a.push.apply(a,x)}return a}function h(f){for(var m=1;m<arguments.length;m++){var a=arguments[m]!=null?arguments[m]:{};m%2?I(Object(a),!0).forEach(function(x){A(f,x,a[x])}):Object.getOwnPropertyDescriptors?Object.defineProperties(f,Object.getOwnPropertyDescriptors(a)):I(Object(a)).forEach(function(x){Object.defineProperty(f,x,Object.getOwnPropertyDescriptor(a,x))})}return f}function A(f,m,a){return(m=y(m))in f?Object.defineProperty(f,m,{value:a,enumerable:!0,configurable:!0,writable:!0}):f[m]=a,f}function y(f){var m=N(f,"string");return typeof m=="symbol"?m:m+""}function N(f,m){if(typeof f!="object"||!f)return f;var a=f[Symbol.toPrimitive];if(a!==void 0){var x=a.call(f,m||"default");if(typeof x!="object")return x;throw new TypeError("@@toPrimitive must return a primitive value.")}return(m==="string"?String:Number)(f)}let D=w.SKIP_SYMBOL=Symbol("skip");function j(f){return f<10?"0"+f:f}function $(f,m,a,x){var b=a?"":f.getUTCFullYear()+"-"+j(f.getUTCMonth()+1)+"-"+j(f.getUTCDate());return m||(b+="T"+j(f.getUTCHours())+":"+j(f.getUTCMinutes())+":"+j(f.getUTCSeconds())+(x?"."+(f.getUTCMilliseconds()/1e3).toFixed(3).slice(2,5):"")+"Z"),b}function l(f,m){return m>f.length?f.repeat(Math.trunc(m/f.length)+1).substring(0,m):f}function c(){let f=b=>b&&typeof b=="object";for(var m=arguments.length,a=new Array(m),x=0;x<m;x++)a[x]=arguments[x];return a.reduce((b,T)=>(Object.keys(T||{}).forEach(B=>{let Q=b[B],H=T[B];f(Q)&&f(H)?b[B]=c(Q,H):b[B]=H}),b),Array.isArray(a[a.length-1])?[]:{})}function v(f){var m=U(f),a=K(m,m,m,m),x="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,b=>{var T=a()*16%16|0;return(b=="x"?T:T&3|8).toString(16)});return x}function P(f){return{value:f==="object"?{}:f==="array"?[]:void 0}}function E(f,m){m&&f.pop()}function F(f){var m,a,x,b,T,B,Q;return{name:(f==null||(m=f.xml)===null||m===void 0?void 0:m.name)||"",prefix:(f==null||(a=f.xml)===null||a===void 0?void 0:a.prefix)||"",namespace:(f==null||(x=f.xml)===null||x===void 0?void 0:x.namespace)||null,attribute:(b=f==null||(T=f.xml)===null||T===void 0?void 0:T.attribute)!==null&&b!==void 0?b:!1,wrapped:(B=f==null||(Q=f.xml)===null||Q===void 0?void 0:Q.wrapped)!==null&&B!==void 0?B:!1}}function q(f){let m=f?.xml;return m!=null&&m.nodeType?m.nodeType:m?.attribute===!0?"attribute":m?.wrapped===!0&&f?.type==="array"?"element":f!=null&&f.$ref||f!=null&&f.$dynamicRef||f?.type==="array"||f!=null&&f.oneOf||f!=null&&f.anyOf||f!=null&&f.allOf?"none":"element"}function W(f){let m=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{value:x}=f,{propertyName:b}=a,{name:T,prefix:B,namespace:Q}=F(m),H=q(m),S=T||b?"".concat(B?B+":":"").concat(T||b):null,G=typeof x=="object"?Array.isArray(x)?[...x]:h({},x):x;switch(H){case"attribute":S&&(S="$".concat(S));break;case"text":S="#text";break;case"cdata":S="#cdata";break;case"none":if(m.type==="array"){if(S=null,m.example!==void 0){var X;S=((X=m.items)===null||X===void 0||(X=X.xml)===null||X===void 0?void 0:X.name)||S}}else S=null;break;default:m.type==="array"&&Array.isArray(G)&&(G={[S]:[...G]});break}return Q&&H!=="text"&&H!=="cdata"&&H!=="none"&&(typeof G=="object"?G["$xmlns".concat(B?":"+B:"")]=Q:G={["$xmlns".concat(B?":"+B:"")]:Q,"#text":G}),{propertyName:S,value:G}}function U(f){var m=0;if(f.length==0)return m;for(var a=0;a<f.length;a++){var x=f.charCodeAt(a);m=(m<<5)-m+x,m=m&m}return m}function K(f,m,a,x){return function(){f|=0,m|=0,a|=0,x|=0;var b=f-(m<<27|m>>>5)|0;return f=m^(a<<17|a>>>15),m=a+x|0,a=x+b|0,x=f+b|0,(x>>>0)/4294967296}}},{}]},{},[6])(6)})});var zt=Nt((Ke,Kt)=>{"use strict";Kt.exports=(Y,C=process.argv)=>{let J=Y.startsWith("-")?"":Y.length===1?"-":"--",_=C.indexOf(J+Y),R=C.indexOf("--");return _!==-1&&(R===-1||_<R)}});var We=Nt((ze,Zt)=>{"use strict";var Ge=bt("os"),Jt=bt("tty"),ft=zt(),{env:it}=process,mt;ft("no-color")||ft("no-colors")||ft("color=false")||ft("color=never")?mt=0:(ft("color")||ft("colors")||ft("color=true")||ft("color=always"))&&(mt=1);"FORCE_COLOR"in it&&(it.FORCE_COLOR==="true"?mt=1:it.FORCE_COLOR==="false"?mt=0:mt=it.FORCE_COLOR.length===0?1:Math.min(parseInt(it.FORCE_COLOR,10),3));function It(Y){return Y===0?!1:{level:Y,hasBasic:!0,has256:Y>=2,has16m:Y>=3}}function Dt(Y,C){if(mt===0)return 0;if(ft("color=16m")||ft("color=full")||ft("color=truecolor"))return 3;if(ft("color=256"))return 2;if(Y&&!C&&mt===void 0)return 0;let J=mt||0;if(it.TERM==="dumb")return J;if(process.platform==="win32"){let _=Ge.release().split(".");return Number(_[0])>=10&&Number(_[2])>=10586?Number(_[2])>=14931?3:2:1}if("CI"in it)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some(_=>_ in it)||it.CI_NAME==="codeship"?1:J;if("TEAMCITY_VERSION"in it)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(it.TEAMCITY_VERSION)?1:0;if(it.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in it){let _=parseInt((it.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(it.TERM_PROGRAM){case"iTerm.app":return _>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(it.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(it.TERM)||"COLORTERM"in it?1:J}function Be(Y){let C=Dt(Y,Y&&Y.isTTY);return It(C)}Zt.exports={supportsColor:Be,stdout:It(Dt(!0,Jt.isatty(1))),stderr:It(Dt(!0,Jt.isatty(2)))}});export{Fe as a,Ue as b,We as c};
|