@redocly/cli 0.0.0-snapshot.1793634365 → 0.0.0-snapshot.1793641805
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/lib/chunks/{7EQLB7LP.js → 232ATLVT.js} +1 -1
- package/lib/chunks/{RRIV3EHA.js → 2BPGHJRM.js} +46 -6
- package/lib/chunks/{MQ5BA5G2.js → 34SE7IKL.js} +1 -1
- package/lib/chunks/{B4QEAX74.js → 36UZWYZY.js} +1 -1
- package/lib/chunks/{E6L6DXPL.js → 3HB43NU5.js} +1 -1
- package/lib/chunks/{WM2YPWLO.js → 463LAXBF.js} +1 -1
- package/lib/chunks/{DNGEQLDY.js → 4D7XZ3FN.js} +1 -1
- package/lib/chunks/{FLMPHEPL.js → 5DOFLOGV.js} +2 -2
- package/lib/chunks/{TUHQFT5Q.js → 6BPS4GIM.js} +1 -1
- package/lib/chunks/{IESUVLCO.js → 6IOG6DJV.js} +1 -1
- package/lib/chunks/{7ZVC32EU.js → 7HCSDFXL.js} +1 -1
- package/lib/chunks/7NOVV2D2.js +28 -0
- package/lib/chunks/{IKC4DXUG.js → AZ5SJ7LU.js} +1 -1
- package/lib/chunks/{3RJYHSWV.js → BZWNPT27.js} +1 -1
- package/lib/chunks/{F535IDU4.js → CEC4F5TY.js} +1 -1
- package/lib/chunks/{FRC4VTX7.js → EGV5BAOX.js} +1 -1
- package/lib/chunks/{XXSPULVM.js → EPSUTVFQ.js} +1 -1
- package/lib/chunks/{JEFVMI6X.js → F3IMFJNF.js} +1 -1
- package/lib/chunks/{PC5SY73H.js → GETZ7GW2.js} +1 -1
- package/lib/chunks/{4KEUCKH2.js → GX7XODFR.js} +20 -7
- package/lib/chunks/{FR2ROJXF.js → H6THGX5A.js} +1 -1
- package/lib/chunks/{U4XFU44Z.js → JQ3KXKVP.js} +1 -1
- package/lib/chunks/{ODGWI3NN.js → JQUWXFUV.js} +1 -1
- package/lib/chunks/{NZ35BKRY.js → KMKP6S6C.js} +2 -2
- package/lib/chunks/{OFCBZIPV.js → KPJBLO4U.js} +1 -1
- package/lib/chunks/{GQTFT7VK.js → LDSAXT7B.js} +1 -1
- package/lib/chunks/{BYXGTGTC.js → MEVRVJPB.js} +1 -1
- package/lib/chunks/{2VVA5MVM.js → RO3R4OOB.js} +1 -1
- package/lib/chunks/{OOEFV6Z4.js → UB5MFIJQ.js} +1 -1
- package/lib/chunks/{L3SVOYUL.js → UEVAXO45.js} +1 -1
- package/lib/chunks/{X6EMKM3S.js → UFETSU2F.js} +1 -1
- package/lib/chunks/{6LWQ5TYN.js → UTRUWRSP.js} +1 -1
- package/lib/chunks/{EVCBWZMB.js → X5HIKPRX.js} +1 -1
- package/lib/chunks/{DTIZ4K5G.js → XMYRSD4A.js} +1 -1
- package/lib/chunks/{7VSOXAWC.js → XRAJKOEF.js} +1 -1
- package/lib/chunks/{JPS7RYPY.js → XUDQJZ3X.js} +1 -1
- package/lib/chunks/{TOJ7W5FT.js → ZU4MVD3T.js} +1 -1
- package/lib/eject-assets/generators/cli/docs.ts +1 -1
- package/lib/eject-assets/generators/cli/engine-source.ts +1 -1
- package/lib/eject-assets/generators/cli/index.ts +2 -2
- package/lib/eject-assets/generators/cli/render.ts +1 -1
- package/lib/eject-assets/generators/go/client.ts +1 -1
- package/lib/eject-assets/generators/go/descriptor.ts +1 -1
- package/lib/eject-assets/generators/go/index.ts +2 -2
- package/lib/eject-assets/generators/go/models.ts +1 -1
- package/lib/eject-assets/generators/go/naming.ts +1 -1
- package/lib/eject-assets/generators/go/operations.ts +1 -1
- package/lib/eject-assets/generators/go/pagination.ts +1 -1
- package/lib/eject-assets/generators/go/types.ts +1 -1
- package/lib/eject-assets/generators/java/client.ts +1 -1
- package/lib/eject-assets/generators/java/descriptor.ts +1 -1
- package/lib/eject-assets/generators/java/index.ts +2 -2
- package/lib/eject-assets/generators/java/models.ts +1 -1
- package/lib/eject-assets/generators/java/naming.ts +1 -1
- package/lib/eject-assets/generators/java/operations.ts +1 -1
- package/lib/eject-assets/generators/java/pagination.ts +1 -1
- package/lib/eject-assets/generators/java/types.ts +1 -1
- package/lib/eject-assets/generators/mock/faker.ts +1 -1
- package/lib/eject-assets/generators/mock/index.ts +2 -2
- package/lib/eject-assets/generators/mock/render.ts +1 -1
- package/lib/eject-assets/generators/mock/sample.ts +1 -1
- package/lib/eject-assets/generators/mock/values.ts +1 -1
- package/lib/eject-assets/generators/php/client.ts +1 -1
- package/lib/eject-assets/generators/php/descriptor.ts +1 -1
- package/lib/eject-assets/generators/php/index.ts +2 -2
- package/lib/eject-assets/generators/php/models.ts +1 -1
- package/lib/eject-assets/generators/php/naming.ts +1 -1
- package/lib/eject-assets/generators/php/operations.ts +1 -1
- package/lib/eject-assets/generators/php/pagination.ts +1 -1
- package/lib/eject-assets/generators/php/types.ts +1 -1
- package/lib/eject-assets/generators/python/client.ts +1 -1
- package/lib/eject-assets/generators/python/descriptor.ts +1 -1
- package/lib/eject-assets/generators/python/index.ts +2 -2
- package/lib/eject-assets/generators/python/models.ts +1 -1
- package/lib/eject-assets/generators/python/naming.ts +1 -1
- package/lib/eject-assets/generators/python/operations.ts +1 -1
- package/lib/eject-assets/generators/python/pagination.ts +1 -1
- package/lib/eject-assets/generators/python/types.ts +1 -1
- package/lib/eject-assets/generators/swr/index.ts +2 -2
- package/lib/eject-assets/generators/swr/render.ts +1 -1
- package/lib/eject-assets/generators/tanstack-query/index.ts +2 -2
- package/lib/eject-assets/generators/tanstack-query/render.ts +1 -1
- package/lib/eject-assets/generators/transformers/index.ts +2 -2
- package/lib/eject-assets/generators/transformers/render.ts +1 -1
- package/lib/eject-assets/generators/typescript/banner.ts +1 -1
- package/lib/eject-assets/generators/typescript/client.ts +1 -1
- package/lib/eject-assets/generators/typescript/descriptor.ts +1 -1
- package/lib/eject-assets/generators/typescript/index.ts +2 -2
- package/lib/eject-assets/generators/typescript/inline-runtime.ts +1 -1
- package/lib/eject-assets/generators/typescript/operation-signature.ts +1 -1
- package/lib/eject-assets/generators/typescript/operation-types.ts +1 -1
- package/lib/eject-assets/generators/typescript/operations.ts +1 -1
- package/lib/eject-assets/generators/typescript/response-headers.ts +1 -1
- package/lib/eject-assets/generators/typescript/type-guards.ts +1 -1
- package/lib/eject-assets/generators/typescript/types.ts +1 -1
- package/lib/eject-assets/generators/zod/index.ts +2 -2
- package/lib/eject-assets/generators/zod/schemas.ts +1 -1
- package/lib/eject-assets/skills/go-generator/SKILL.md +5 -1
- package/lib/eject-assets/skills/php-generator/SKILL.md +5 -3
- package/lib/eject-assets/skills/python-generator/SKILL.md +2 -0
- package/lib/index.js +3 -3
- package/package.json +1 -1
- package/lib/chunks/AXVJNFC4.js +0 -25
|
@@ -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{b as a,c as b,d as c}from"./
|
|
7
|
+
import{b as a,c as b,d as c}from"./JQ3KXKVP.js";import"./GX7XODFR.js";import"./EPSUTVFQ.js";import"./JQUWXFUV.js";import"./KMKP6S6C.js";import"./F3IMFJNF.js";import"./2BPGHJRM.js";import"./WZXA5XPB.js";import"./X22IMAJK.js";import"./6RTITFQA.js";import"./RFWIIJFG.js";export{b as cliDocs,a as cliGenerator,c as cliSample};
|
|
@@ -6,9 +6,9 @@ var __filename = __fileURLToPath(import.meta.url);
|
|
|
6
6
|
var __dirname = __pathDirname(__filename);
|
|
7
7
|
import{c as b,ka as T}from"./X22IMAJK.js";var A=class{indentUnit;lines=[];depth=0;constructor(n=" "){this.indentUnit=n}line(n=""){return this.lines.push(n===""?"":this.indentUnit.repeat(this.depth)+n),this}blank(){return this.line()}indent(n){return this.depth++,n(),this.depth--,this}block(n,t,r){return this.line(n),this.indent(t),r===void 0?this:this.line(r)}toString(){return this.lines.join(`
|
|
8
8
|
`)+`
|
|
9
|
-
`}};function v(e){return e.replace(/^\+(?=\d)/,"plus ").replace(/^-(?=\d)/,"minus ").replace(/([A-Z]{2,})s(?![a-z])/g,"$1S").replace(/([a-z0-9])([A-Z])/g,"$1 $2").replace(/([A-Z]+)([A-Z][a-z])/g,"$1 $2").split(/[^A-Za-z0-9]+/).filter(n=>n!=="").map(n=>n.toLowerCase())}var E=e=>e.charAt(0).toUpperCase()+e.slice(1),w={camel:e=>{let[n,...t]=v(e);return(n??"")+t.map(E).join("")},pascal:e=>v(e).map(E).join(""),snake:e=>v(e).join("_"),screaming:e=>v(e).join("_").toUpperCase()},ae={typescript:new Set(["break","case","catch","class","const","continue","debugger","default","delete","do","else","enum","export","extends","false","finally","for","function","if","import","in","instanceof","new","null","return","super","switch","this","throw","true","try","typeof","var","void","while","with","implements","interface","let","package","private","protected","public","static","yield","await"]),python:new Set(["false","none","true","and","as","assert","async","await","break","class","continue","def","del","elif","else","except","finally","for","from","global","if","import","in","is","lambda","nonlocal","not","or","pass","raise","return","try","while","with","yield","match","case","type"]),go:new Set(["break","case","chan","const","continue","default","defer","else","fallthrough","for","func","go","goto","if","import","interface","map","package","range","return","select","struct","switch","type","var"]),php:new Set(["abstract","and","array","as","break","callable","case","catch","class","clone","const","continue","declare","default","die","do","echo","else","elseif","empty","enddeclare","endfor","endforeach","endif","endswitch","endwhile","enum","eval","exit","extends","final","finally","fn","for","foreach","function","global","goto","if","implements","include","instanceof","insteadof","interface","isset","list","match","namespace","new","or","print","private","protected","public","readonly","require","return","static","switch","throw","trait","try","unset","use","var","while","xor","yield","true","false","null","int","float","bool","string","void","iterable","object","mixed","never","self","parent"]),java:new Set(["abstract","assert","boolean","break","byte","case","catch","char","class","const","continue","default","do","double","else","enum","extends","final","finally","float","for","goto","if","implements","import","instanceof","int","interface","long","native","new","package","private","protected","public","return","short","static","strictfp","super","switch","synchronized","this","throw","throws","transient","try","void","volatile","while","true","false","null","var","yield","record","sealed","permits","non-sealed"])};function F(e,n={}){let t=w[n.style??"camel"](e),r=t===""?"_":/^[0-9]/.test(t)?`_${t}`:t;return n.reserved?.has(r.toLowerCase())?`${r}_`:r}function P(e,n={}){let t=new Set(n.taken??[]),r=n.style==="snake"||n.style==="screaming"?"_":"";return e.map(a=>{let o=F(a,n),i=o;for(let s=2;t.has(i);s++)i=`${o}${r}${s}`;return t.add(i),i})}function m(e,n){let t=new Set,r=e;for(;r.kind==="ref";){let{name:a}=r;if(t.has(a))return;t.add(a);let o=n.schemas.find(i=>i.name===a);if(o===void 0)return;r=o.schema}return r}function K(e,n){let t=m(e,n);if(t===void 0)return;if(t.kind==="object")return{properties:t.properties,description:t.description};if(t.kind!=="intersection")return;let r=new Map;for(let a of t.members){let o=K(a,n);if(o===void 0)return;for(let i of o.properties)r.set(i.name,i)}return{properties:[...r.values()],description:t.description}}function ie(e,n){let t=m(e,n);if(t?.kind!=="union"||t.discriminator===void 0)return;let r=[];for(let{value:a,schemaName:o}of t.discriminator.mapping){let i=m({kind:"ref",name:o},n);if(i===void 0)return;r.push({value:a,schemaName:o,schema:i})}return{property:t.discriminator.propertyName,cases:r}}function B(e){return e.kind==="union"&&e.members.some(n=>n.kind==="null")}function de(e){if(e.kind!=="union"||!B(e))return e;let n=e.members.filter(t=>t.kind!=="null");return n.length===1?n[0]:{...e,members:n}}function le(e){if(e.kind!=="enum")return;let n=P(e.values.map(t=>typeof t=="string"?w.screaming(t):`VALUE_${w.screaming(String(t))}`),{style:"screaming"});return{values:e.values,scalar:e.scalar,memberNames:n}}function ce(e){if(!e)return[];let n=e.split(/\r\n|\n|\r/).map(t=>t.trim());for(;n.length>0&&n[0]==="";)n.shift();for(;n.length>0&&n[n.length-1]==="";)n.pop();return n}function
|
|
10
|
-
`),z.getStore()?.(
|
|
11
|
-
- `));return t}function R(e,n,t,r,a){let o=`Pagination for operation "${e.name}" (${r})`,i=J(t);if(i!==void 0)return{error:`${o}: ${i}`};let s=t,d=l=>a?{error:`${o}: ${l}`}:{};if(e.sse!==void 0)return d("the operation is a Server-Sent Events stream");if(s.style!=="link"&&s.style!=="body-link"){let l=s.style==="cursor"?"cursorParam":"offsetParam",c=s.style==="cursor"?s.cursorParam:s.offsetParam,O=e.queryParams.find(u=>u.name===c);if(!O){let u=e.queryParams.map(M=>M.name).join(", ");return d(`query parameter "${c}" is not declared on the operation`+(u===""?"":` (declared: ${u})`))}let p=j(O.schema,n);if(!(p!==void 0&&(s.style==="cursor"?x(p,n):p.kind==="scalar"&&(p.scalar==="number"||p.scalar==="integer")))){let u=s.style==="cursor"?"a string":"a number";return d(`the "${l}" query parameter "${c}" must accept ${u} (got ${Y(p)})`)}}let h=e.successResponses.find(l=>l.contentType.toLowerCase().includes("json"));if(!h)return d("the operation has no JSON success response");if(s.style==="link"){let l=e.successResponseHeaders?.some(c=>c.name==="link")===!0;if(!l&&!a)return{};l
|
|
9
|
+
`}};function v(e){return e.replace(/^\+(?=\d)/,"plus ").replace(/^-(?=\d)/,"minus ").replace(/([A-Z]{2,})s(?![a-z])/g,"$1S").replace(/([a-z0-9])([A-Z])/g,"$1 $2").replace(/([A-Z]+)([A-Z][a-z])/g,"$1 $2").split(/[^A-Za-z0-9]+/).filter(n=>n!=="").map(n=>n.toLowerCase())}var E=e=>e.charAt(0).toUpperCase()+e.slice(1),w={camel:e=>{let[n,...t]=v(e);return(n??"")+t.map(E).join("")},pascal:e=>v(e).map(E).join(""),snake:e=>v(e).join("_"),screaming:e=>v(e).join("_").toUpperCase()},ae={typescript:new Set(["break","case","catch","class","const","continue","debugger","default","delete","do","else","enum","export","extends","false","finally","for","function","if","import","in","instanceof","new","null","return","super","switch","this","throw","true","try","typeof","var","void","while","with","implements","interface","let","package","private","protected","public","static","yield","await"]),python:new Set(["false","none","true","and","as","assert","async","await","break","class","continue","def","del","elif","else","except","finally","for","from","global","if","import","in","is","lambda","nonlocal","not","or","pass","raise","return","try","while","with","yield","match","case","type"]),go:new Set(["break","case","chan","const","continue","default","defer","else","fallthrough","for","func","go","goto","if","import","interface","map","package","range","return","select","struct","switch","type","var"]),php:new Set(["abstract","and","array","as","break","callable","case","catch","class","clone","const","continue","declare","default","die","do","echo","else","elseif","empty","enddeclare","endfor","endforeach","endif","endswitch","endwhile","enum","eval","exit","extends","final","finally","fn","for","foreach","function","global","goto","if","implements","include","instanceof","insteadof","interface","isset","list","match","namespace","new","or","print","private","protected","public","readonly","require","return","static","switch","throw","trait","try","unset","use","var","while","xor","yield","true","false","null","int","float","bool","string","void","iterable","object","mixed","never","self","parent"]),java:new Set(["abstract","assert","boolean","break","byte","case","catch","char","class","const","continue","default","do","double","else","enum","extends","final","finally","float","for","goto","if","implements","import","instanceof","int","interface","long","native","new","package","private","protected","public","return","short","static","strictfp","super","switch","synchronized","this","throw","throws","transient","try","void","volatile","while","true","false","null","var","yield","record","sealed","permits","non-sealed"])};function F(e,n={}){let t=w[n.style??"camel"](e),r=t===""?"_":/^[0-9]/.test(t)?`_${t}`:t;return n.reserved?.has(r.toLowerCase())?`${r}_`:r}function P(e,n={}){let t=new Set(n.taken??[]),r=n.style==="snake"||n.style==="screaming"?"_":"";return e.map(a=>{let o=F(a,n),i=o;for(let s=2;t.has(i);s++)i=`${o}${r}${s}`;return t.add(i),i})}function m(e,n){let t=new Set,r=e;for(;r.kind==="ref";){let{name:a}=r;if(t.has(a))return;t.add(a);let o=n.schemas.find(i=>i.name===a);if(o===void 0)return;r=o.schema}return r}function K(e,n){let t=m(e,n);if(t===void 0)return;if(t.kind==="object")return{properties:t.properties,description:t.description};if(t.kind!=="intersection")return;let r=new Map;for(let a of t.members){let o=K(a,n);if(o===void 0)return;for(let i of o.properties)r.set(i.name,i)}return{properties:[...r.values()],description:t.description}}function ie(e,n){let t=m(e,n);if(t?.kind!=="union"||t.discriminator===void 0)return;let r=[];for(let{value:a,schemaName:o}of t.discriminator.mapping){let i=m({kind:"ref",name:o},n);if(i===void 0)return;r.push({value:a,schemaName:o,schema:i})}return{property:t.discriminator.propertyName,cases:r}}function B(e){return e.kind==="union"&&e.members.some(n=>n.kind==="null")}function de(e){if(e.kind!=="union"||!B(e))return e;let n=e.members.filter(t=>t.kind!=="null");return n.length===1?n[0]:{...e,members:n}}function le(e){if(e.kind!=="enum")return;let n=P(e.values.map(t=>typeof t=="string"?w.screaming(t):`VALUE_${w.screaming(String(t))}`),{style:"screaming"});return{values:e.values,scalar:e.scalar,memberNames:n}}function ce(e){if(!e)return[];let n=e.split(/\r\n|\n|\r/).map(t=>t.trim());for(;n.length>0&&n[0]==="";)n.shift();for(;n.length>0&&n[n.length-1]==="";)n.pop();return n}function $(e,n,t){if(e.kind==="object")return e.properties.find(r=>r.name===n)?.schema;if(e.kind==="record")return e.value;if(e.kind==="array"&&/^(0|[1-9]\d*)$/.test(n))return e.items;if(e.kind==="intersection"){let r;for(let a of e.members){let o=m(a,t);o!==void 0&&(r=$(o,n,t)??r)}return r}}function g(e,n,t){let r=e.kind==="omit"?{kind:"ref",name:e.base}:e,a=m(r,t);if(!(a===void 0||n!==""&&!n.startsWith("/"))){if(n==="")return a;for(let o of n.slice(1).split("/")){let i=o.replaceAll("~1","/").replaceAll("~0","~"),s=$(a,i,t);if(s===void 0||(a=m(s,t),a===void 0))return}return a}}function k(e,n,t=new Set){if(e.kind==="ref"){if(t.has(e.name))return"string";t.add(e.name);let r=n.schemas.find(a=>a.name===e.name);return r===void 0?"string":k(r.schema,n,t)}if(e.kind==="intersection"){let r=e.members.filter(o=>o.kind!=="unknown");if(r.length===1)return k(r[0],n,t);let a=[...new Set(r.map(o=>k(o,n,new Set(t))))];return a.length===1?a[0]:a.every(o=>o==="integer"||o==="number")?"number":"string"}if(e.kind==="union"){let r=e.members.filter(a=>a.kind!=="null");return r.length===1?k(r[0],n,t):"string"}if(e.kind==="scalar"||e.kind==="enum"){if(e.scalar==="integer")return"integer";if(e.scalar==="number")return"number";if(e.scalar==="boolean")return"boolean"}if(e.kind==="literal"){if(typeof e.value=="number")return Number.isInteger(e.value)?"integer":"number";if(typeof e.value=="boolean")return"boolean"}return"string"}import{AsyncLocalStorage as H}from"node:async_hooks";var z=new H,G={"operation-skipped":!0,"name-changed":!0,"option-ignored":!0,"generator-replaced":!0,"description-ignored":!0,"undocumented-header":!0,"browser-unsupported":!0,"command-shadowed":!0};function I(e){if(!W(e))throw new Error(`invalid finding ${JSON.stringify(e)}: a finding is { kind, message, operations }, with a known kind and the operation IDs as strings.`);T.warn(`generate-client: ${e.message}
|
|
10
|
+
`);let{kind:n,message:t,operations:r}=e;z.getStore()?.({kind:n,message:t,operations:r})}function W(e){if(!b(e))return!1;let{kind:n,message:t,operations:r}=e;if(typeof n!="string"||!Object.hasOwn(G,n)||typeof t!="string"||!Array.isArray(r))return!1;for(let a of r)if(typeof a!="string")return!1;return!0}function q(e){return e.flatMap(n=>n.operations)}function V(e,n,t){let r=e.specName??e.name;if(t?.exclude?.includes(r))return{};let a=t?.operations?.[r];if(a!==void 0)return R(e,n,a,`pagination.operations["${r}"]`,!0);if(e.paginationExtension!==void 0)return R(e,n,e.paginationExtension,"x-redoclyPagination",!0);if(t?.style!==void 0){let{exclude:o,operations:i,...s}=t;return R(e,n,s,"pagination convention",!1)}return{}}function we(e,n){let t=new Map,r=[];for(let a of q(e.services)){let o=V(a,e,n);o.error!==void 0?r.push(o.error):o.spec!==void 0&&t.set(a.name,{spec:o.spec,itemSchema:o.itemSchema})}if(r.length>0)throw new Error(["Invalid pagination configuration:",...r].join(`
|
|
11
|
+
- `));return t}function R(e,n,t,r,a){let o=`Pagination for operation "${e.name}" (${r})`,i=J(t);if(i!==void 0)return{error:`${o}: ${i}`};let s=t,d=l=>a?{error:`${o}: ${l}`}:{};if(e.sse!==void 0)return d("the operation is a Server-Sent Events stream");if(s.style!=="link"&&s.style!=="body-link"){let l=s.style==="cursor"?"cursorParam":"offsetParam",c=s.style==="cursor"?s.cursorParam:s.offsetParam,O=e.queryParams.find(u=>u.name===c);if(!O){let u=e.queryParams.map(M=>M.name).join(", ");return d(`query parameter "${c}" is not declared on the operation`+(u===""?"":` (declared: ${u})`))}let p=j(O.schema,n);if(!(p!==void 0&&(s.style==="cursor"?x(p,n):p.kind==="scalar"&&(p.scalar==="number"||p.scalar==="integer")))){let u=s.style==="cursor"?"a string":"a number";return d(`the "${l}" query parameter "${c}" must accept ${u} (got ${Y(p)})`)}}let h=e.successResponses.find(l=>l.contentType.toLowerCase().includes("json"));if(!h)return d("the operation has no JSON success response");if(s.style==="link"){let l=e.successResponseHeaders?.some(c=>c.name==="link")===!0;if(!l&&!a)return{};l||I({kind:"undocumented-header",message:`${o} follows the Link header, but the success response does not document one.`,operations:[e.specName??e.name]})}let f=g(h.schema,s.items,n);if(f===void 0)return d(`the "items" pointer "${s.items}" does not resolve in the success response schema`);if(f.kind!=="array")return d(`the "items" pointer "${s.items}" must point at an array (got ${f.kind})`);if(s.style==="body-link"){let l=g(h.schema,s.nextLink,n);if(l===void 0)return d(`the "nextLink" pointer "${s.nextLink}" does not resolve in the success response schema`);if(!x(l,n))return d(`the "nextLink" pointer "${s.nextLink}" must point at a string (got ${l.kind})`)}if(s.style==="cursor"){let l=g(h.schema,s.nextCursor,n);if(l===void 0)return d(`the "nextCursor" pointer "${s.nextCursor}" does not resolve in the success response schema`);if(!x(l,n))return d(`the "nextCursor" pointer "${s.nextCursor}" must point at a string (got ${l.kind})`);if(s.hasMore!==void 0){let c=g(h.schema,s.hasMore,n);if(c===void 0)return d(`the "hasMore" pointer "${s.hasMore}" does not resolve in the success response schema`);if(c.kind!=="scalar"||c.scalar!=="boolean")return d(`the "hasMore" pointer "${s.hasMore}" must point at a boolean (got ${c.kind})`)}}let y=s.limitParam!==void 0?{limitParam:s.limitParam}:{};return{spec:s.style==="cursor"?{style:"cursor",param:s.cursorParam,...y,nextCursor:s.nextCursor,...s.hasMore!==void 0?{hasMore:s.hasMore}:{},items:s.items}:s.style==="link"?{style:"link",...y,items:s.items}:s.style==="body-link"?{style:"body-link",...y,nextLink:s.nextLink,items:s.items}:{style:s.style,param:s.offsetParam,...y,items:s.items},itemSchema:f.items}}function J(e){if(!b(e))return"the rule must be an object";let{style:n,cursorParam:t,nextCursor:r,hasMore:a,offsetParam:o,nextLink:i,limitParam:s,items:d}=e;if(n!=="cursor"&&n!=="offset"&&n!=="page"&&n!=="link"&&n!=="body-link")return`"style" must be one of "cursor" | "offset" | "page" | "link" | "body-link" (got ${JSON.stringify(n)})`;if(typeof d!="string"||d!==""&&!d.startsWith("/"))return'"items" must be a JSON pointer starting with "/" (or "" when the response body is the item array itself)';if(n==="cursor"){if(typeof t!="string"||t==="")return'cursor style requires a "cursorParam" query parameter name';if(typeof r!="string"||!r.startsWith("/"))return'cursor style requires a "nextCursor" JSON pointer starting with "/"';if(a!==void 0&&(typeof a!="string"||!a.startsWith("/")))return'"hasMore" must be a JSON pointer starting with "/"'}else if(n==="offset"||n==="page"){if(typeof o!="string"||o==="")return`${n} style requires an "offsetParam" query parameter name`}else if(n==="body-link"&&(typeof i!="string"||!i.startsWith("/")))return'body-link style requires a "nextLink" JSON pointer starting with "/"';if(s!==void 0&&typeof s!="string")return'"limitParam" must be a query parameter name'}function Y(e){return e===void 0?"an unresolvable ref":e.kind==="scalar"||e.kind==="enum"?e.scalar:e.kind}function j(e,n){let t=new Set,r=e;for(;r.kind==="ref";){let{name:a}=r;if(t.has(a))return;t.add(a);let o=n.schemas.find(i=>i.name===a);if(o===void 0)return;r=o.schema}return r}function x(e,n){return e.kind==="scalar"||e.kind==="enum"?e.scalar==="string":e.kind==="literal"?typeof e.value=="string":e.kind==="union"?e.members.every(t=>{let r=j(t,n);return r!==void 0&&(r.kind==="null"||r.kind!=="union"&&x(r,n))}):!1}var Re=`// Usage telemetry for a generated Go SDK, written beside the client by
|
|
12
12
|
// \`client.telemetry: on\`. It counts calls per operation through the runtime's
|
|
13
13
|
// OnSettled hook and sends one event per operation and window. An event holds
|
|
14
14
|
// only the operation id, the counts, the window, and the SDK identity.
|
|
@@ -40,6 +40,9 @@ const (
|
|
|
40
40
|
usageTelemetrySendTimeout = 3 * time.Second
|
|
41
41
|
)
|
|
42
42
|
|
|
43
|
+
// usageTelemetryRegistered holds each UsageTelemetry that Register added.
|
|
44
|
+
var usageTelemetryRegistered []*UsageTelemetry
|
|
45
|
+
|
|
43
46
|
var usageTelemetryLatencyBuckets = []struct {
|
|
44
47
|
name string
|
|
45
48
|
belowMs int64
|
|
@@ -127,6 +130,24 @@ func (t *UsageTelemetry) Middleware() Middleware {
|
|
|
127
130
|
return Middleware{OnSettled: t.record}
|
|
128
131
|
}
|
|
129
132
|
|
|
133
|
+
// Register adds the middleware to every client of the package, also to a client created
|
|
134
|
+
// before. Call it once, before the first call, for example in an init function.
|
|
135
|
+
func (t *UsageTelemetry) Register() {
|
|
136
|
+
registeredMiddleware = append(registeredMiddleware, t.Middleware())
|
|
137
|
+
usageTelemetryRegistered = append(usageTelemetryRegistered, t)
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
// FlushUsageTelemetry flushes every UsageTelemetry that Register added, as Flush does.
|
|
141
|
+
// Go has no exit hook, so call it before the program ends.
|
|
142
|
+
func FlushUsageTelemetry(ctx context.Context) error {
|
|
143
|
+
for _, telemetry := range usageTelemetryRegistered {
|
|
144
|
+
if err := telemetry.Flush(ctx); err != nil {
|
|
145
|
+
return err
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
return nil
|
|
149
|
+
}
|
|
150
|
+
|
|
130
151
|
// Flush sends the open window and waits for the send, or for ctx.
|
|
131
152
|
// Go has no exit hook, so call it before the program ends.
|
|
132
153
|
func (t *UsageTelemetry) Flush(ctx context.Context) error {
|
|
@@ -392,7 +413,7 @@ func usageTelemetryRandomHex(byteCount int) string {
|
|
|
392
413
|
rand.Read(buffer)
|
|
393
414
|
return hex.EncodeToString(buffer)
|
|
394
415
|
}
|
|
395
|
-
`,N=["UsageTelemetryOptions","UsageTelemetryEvent","UsageTelemetry","NewUsageTelemetry"];var Se=`<?php
|
|
416
|
+
`,N=["UsageTelemetryOptions","UsageTelemetryEvent","UsageTelemetry","NewUsageTelemetry","FlushUsageTelemetry"];var Se=`<?php
|
|
396
417
|
|
|
397
418
|
// Usage telemetry for a generated PHP SDK, written beside the client by
|
|
398
419
|
// \`client.telemetry: on\`. It counts calls per operation through the runtime's
|
|
@@ -433,6 +454,8 @@ final class UsageTelemetry
|
|
|
433
454
|
/** @var array<int, self> The instances with an open window, by object id. */
|
|
434
455
|
private static array $openWindows = [];
|
|
435
456
|
private static bool $shutdownRegistered = false;
|
|
457
|
+
/** @var array<int, self> The instances that \`register\` added. */
|
|
458
|
+
private static array $registered = [];
|
|
436
459
|
|
|
437
460
|
private array $counts = [];
|
|
438
461
|
private float $windowStart = 0.0;
|
|
@@ -477,6 +500,8 @@ final class UsageTelemetry
|
|
|
477
500
|
$now = microtime(true);
|
|
478
501
|
if ($this->counts !== [] && $now >= $this->nextSendAt) {
|
|
479
502
|
$this->flushWindow(true);
|
|
503
|
+
// The send can take up to SEND_TIMEOUT_MS, so the next window starts after it.
|
|
504
|
+
$now = microtime(true);
|
|
480
505
|
}
|
|
481
506
|
if ($this->counts === []) {
|
|
482
507
|
$this->windowStart = $now;
|
|
@@ -505,6 +530,21 @@ final class UsageTelemetry
|
|
|
505
530
|
$this->flushWindow(true);
|
|
506
531
|
}
|
|
507
532
|
|
|
533
|
+
/** Count the calls of every client of the namespace, also of a client created before. */
|
|
534
|
+
public function register(): void
|
|
535
|
+
{
|
|
536
|
+
Config::$registeredOnSettled[] = $this;
|
|
537
|
+
self::$registered[] = $this;
|
|
538
|
+
}
|
|
539
|
+
|
|
540
|
+
/** Flush every instance that \`register\` added, as \`flush\` does. */
|
|
541
|
+
public static function flushRegistered(): void
|
|
542
|
+
{
|
|
543
|
+
foreach (self::$registered as $telemetry) {
|
|
544
|
+
$telemetry->flush();
|
|
545
|
+
}
|
|
546
|
+
}
|
|
547
|
+
|
|
508
548
|
private static function disabled(): bool
|
|
509
549
|
{
|
|
510
550
|
return getenv('REDOCLY_SDK_TELEMETRY') === 'off' || getenv('DO_NOT_TRACK') === '1';
|
|
@@ -685,7 +725,7 @@ final class UsageTelemetry
|
|
|
685
725
|
return ['key' => $key, 'value' => ['doubleValue' => $value]];
|
|
686
726
|
}
|
|
687
727
|
}
|
|
688
|
-
`,
|
|
728
|
+
`,D=["UsageTelemetry"];var Te={"types.ts":`/**
|
|
689
729
|
* The public type surface of the client runtime \u2014 \`@redocly/client-generator\`'s
|
|
690
730
|
* app-facing runtime module. Pure types, no runtime code (excluded from coverage).
|
|
691
731
|
* The generator emits \`OPERATIONS\` literals typed
|
|
@@ -6361,4 +6401,4 @@ async function runSingle(
|
|
|
6361
6401
|
}
|
|
6362
6402
|
return fail(1, detail);
|
|
6363
6403
|
}
|
|
6364
|
-
}`},
|
|
6404
|
+
}`},L=["ApiError","ApiErrorLike","AuthCredentials","BodyMethod","Capabilities","CliAuthScheme","CliCommand","CliFlag","CliGlobals","CliInvocation","CliWiring","Client","ClientConfig","ClientCore","CommandContext","CommandSource","CustomCommand","Envelope","EnvelopeResult","EnvelopeResultForKnownInit","FRAME_DELIMITER","GLOBAL_FLAGS","HeadersOf","IDEMPOTENT_METHODS","LAYERS","LAYER_OF","LinkPageCall","Middleware","NoRequiredKeys","OperationArgs","OperationContext","OperationDescriptor","OperationMethodIdentity","OpsShape","PageOf","Paginated","PaginationSpec","ParamSpec","ParseAs","QueryStyle","QueryValue","RequestContext","RequestOptions","ResolvedCommand","ResponseHeaderSpec","Result","RetryConfig","RetryContext","RetryStrategy","SecuritySpec","SendCapabilities","ServerSentEvent","SettledCall","SseOptions","SseParseError","TRANSIENT_STATUS","ThrowMethod","TimeoutError","TokenProvider","abortError","acceptFor","anySignal","buildUrl","callInputs","coerceResponseHeader","commandContract","constantCase","createClientCore","defaultRetryOn","encodeBase64","encodeReserved","execute","groupSlug","inputOf","invokedName","isConfigured","items","itemsByLink","kindFor","linkNext","linkPageCall","loadBody","mergeSetup","middlewareChain","namespaceArgs","normalizeCommands","oneLine","pageCall","pages","pagesByLink","paginateCapability","parse","parseInvocation","parseSseFrame","prepareRequest","queryStyles","readEnvelopeHeaders","readError","redactHeaders","renderComposedHelp","renderHelp","resolveAuth","resolvePointer","resolveToken","retryDelay","runCli","runSingle","runSources","send","shadowedCommandName","sleep","splitArgs","sse","stringHeaders","substitutePath","timeoutSignal","toFormData","toHeaderRecord"];var Q=["client","OPERATIONS","Ops","OperationId","OperationPath","OperationTag","createClient","mergeSetup","ApiError","TimeoutError","configure","use","auth","defaultRetryOn","ClientConfig","RequestOptions","SseOptions","Middleware","OperationDescriptor","ServerSentEvent","Result","Envelope","EnvelopeResult","TokenProvider","__redoclySetup"],Z=["z","http","HttpResponse","handlers","faker","queryOptions","useSWR","useSWRMutation","__Writable"],X=["AbortController","AbortSignal","Array","ArrayBuffer","ArrayBufferView","AsyncGenerator","AsyncIterable","Blob","BodyInit","Boolean","DOMException","Date","Error","Extract","FormData","Headers","HeadersInit","JSON","Map","Math","NonNullable","Number","Object","Omit","Partial","Promise","ReadableStream","Record","RegExp","RegExpExecArray","Request","RequestInit","Response","Set","String","Symbol","TextDecoder","TextEncoder","TypeError","Uint8Array","URL","URLSearchParams","btoa","clearTimeout","crypto","decodeURIComponent","document","encodeURIComponent","fetch","globalThis","setTimeout","undefined"],C;function qe(){return C===void 0&&(C=new Set([...Q,...Z,...N,...D,...X,...L])),C}var U={name:"@redocly/client-generator",version:"0.0.0-snapshot.1793641805",description:"Generate typed, zero-dependency TypeScript clients (fetch, auth, retries, middleware, SSE) from OpenAPI descriptions.",type:"module",types:"lib/index.d.ts",sideEffects:!1,exports:{".":{types:"./lib/index.d.ts",import:"./lib/index.js",default:"./lib/index.js"},"./generate":{types:"./lib/generate.d.ts",import:"./lib/generate.js",default:"./lib/generate.js"},"./printers/python":{types:"./lib/printers/python.d.ts",import:"./lib/printers/python.js",default:"./lib/printers/python.js"},"./printers/go":{types:"./lib/printers/go.d.ts",import:"./lib/printers/go.js",default:"./lib/printers/go.js"},"./printers/php":{types:"./lib/printers/php.d.ts",import:"./lib/printers/php.js",default:"./lib/printers/php.js"},"./printers/java":{types:"./lib/printers/java.d.ts",import:"./lib/printers/java.js",default:"./lib/printers/java.js"},"./printers/typescript":{types:"./lib/printers/typescript.d.ts",import:"./lib/printers/typescript.js",default:"./lib/printers/typescript.js"},"./printers":{types:"./lib/printers/index.d.ts",import:"./lib/printers/index.js",default:"./lib/printers/index.js"},"./contracts/typescript":{types:"./lib/contracts/typescript.d.ts",import:"./lib/contracts/typescript.js",default:"./lib/contracts/typescript.js"},"./runtime-sources":{types:"./lib/runtime-sources.d.ts",import:"./lib/runtime-sources.js",default:"./lib/runtime-sources.js"},"./package.json":"./package.json"},engines:{node:">=22.12.0 || >=20.19.0 <21.0.0",npm:">=10"},engineStrict:!0,scripts:{"examples:regen":"node scripts/regenerate-examples.mjs",prepare:"node scripts/generate-runtime-sources.mjs && node scripts/generate-eject-assets.mjs","typecheck:examples":"node scripts/typecheck-examples.mjs"},license:"MIT",repository:{type:"git",url:"git+https://github.com/Redocly/redocly-cli.git"},homepage:"https://github.com/Redocly/redocly-cli",keywords:["OpenAPI","Swagger","TypeScript","client","generator","codegen","fetch"],contributors:["Roman Marshevskyi <roman.marshevskyy@redocly.com> (https://redocly.com/)"],dependencies:{"@redocly/openapi-core":"0.0.0-snapshot.1793641805"},peerDependencies:{typescript:">=5.5.0"},peerDependenciesMeta:{typescript:{optional:!0}},devDependencies:{typescript:"6.0.2"},files:["lib","eject-assets"]};var Le=U.version;function _(e){let n=/^(\d+)\.(\d+)\.(\d+)(?:[-+].*)?$/.exec(e.trim());return n===null?void 0:[Number(n[1]),Number(n[2]),Number(n[3])]}function S(e,n){return e[0]-n[0]||e[1]-n[1]||e[2]-n[2]}function Ue(e,n){let t=/^[\^~]|^>=/.exec(n.trim())?.[0]??"",r=_(n.trim().slice(t.length)),a=_(e);if(!(r===void 0||a===void 0))return S(a,r)<0?!1:t===">="?!0:t===""?S(a,r)===0:t==="~"?a[0]===r[0]&&a[1]===r[1]:r[0]!==0?a[0]===r[0]:r[1]!==0?a[0]===0&&a[1]===r[1]:S(a,r)===0}export{A as a,w as b,ae as c,F as d,P as e,m as f,K as g,ie as h,B as i,de as j,le as k,ce as l,g as m,k as n,z as o,I as p,q,we as r,Re as s,Se as t,Te as u,Ae as v,Q as w,qe as x,Le as y,Ue as z};
|
|
@@ -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{f as L}from"./
|
|
7
|
+
import{f as L}from"./GX7XODFR.js";import{b as $,c as w,d as M,f as D,g as q,h as B,i as _,j as F,k as U}from"./JQUWXFUV.js";import{h as T,j as E}from"./KMKP6S6C.js";import{d as k,f as C,h as P,i as j,m as A}from"./F3IMFJNF.js";import{q as f,u as b,v as N,w as I,y as v}from"./2BPGHJRM.js";import{join as x}from"node:path";var d="// Generated by @redocly/client-generator \u2014 do not edit by hand.\n// Source: OpenAPI description. Re-run `redocly generate-client` to update.";function S(e){return e.filter(t=>t.length>0).join(`
|
|
8
8
|
|
|
9
9
|
`)+`
|
|
10
10
|
`}function O(e){let t=["/**",` * ${j(`${e.title} (v${e.version})`)}`];if(e.description)for(let n of A(j(e.description)))t.push(` * ${n}`.replace(/ +$/,""));return t.push(" */"),t.join(`
|
|
@@ -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 R}from"./
|
|
7
|
+
import{b as R}from"./GX7XODFR.js";import{b as E,c as J,d as oe,e as W,f as ie,g as ce,h as le,i as ue,j as me}from"./KMKP6S6C.js";import{a as ae,b as te,c as x,d as b,e as v,f as A,g as L,h as P,j as O,k as N,l as se,n as re}from"./2BPGHJRM.js";import{a as F}from"./WZXA5XPB.js";var T=x.java,j=class extends ae{constructor(){super(" ")}typeName(n){return b(n,{style:"pascal",reserved:T})}memberName(n){return b(n,{style:"camel",reserved:T})}identifier(n){return b(n,{style:"camel",reserved:T})}identifiers(n,t){return v(n,{style:"camel",reserved:T,taken:t})}string(n){let t='"';for(let a of n){let o=a.codePointAt(0);a==="\\"?t+="\\\\":a==='"'?t+='\\"':a===`
|
|
8
8
|
`?t+="\\n":a==="\r"?t+="\\r":a===" "?t+="\\t":o<32||o===127?t+=`\\u${o.toString(16).padStart(4,"0")}`:o>=55296&&o<=57343?t+="\\uFFFD":t+=a}return t+'"'}literal(n){return n==null?"null":typeof n=="boolean"?String(n):typeof n=="number"?Number.isInteger(n)?`${n}L`:String(n):typeof n=="string"?this.string(n):Array.isArray(n)?`java.util.List.of(${n.map(a=>this.literal(a)).join(", ")})`:`java.util.Map.of(${Object.entries(n).map(([a,o])=>`${this.string(a)}, ${this.literal(o)}`).join(", ")})`}comment(n){for(let t of fe(n))this.line(t===""?"//":`// ${t}`);return this}doc(n,t){let a=fe(t).map(o=>o.replaceAll("*/","*/"));if(a.length===0)return this;if(a.length===1)return this.line(`/** ${n} \u2014 ${a[0]} */`);this.line("/**"),this.line(` * ${n} \u2014 ${a[0]}`);for(let o of a.slice(1))this.line(o===""?" *":` * ${o}`);return this.line(" */")}};function fe(e){return se(e).map(n=>n.replaceAll("\\","\\u005c"))}var h=x.java,K=new j,pe=new Set([...[...R.replace(/\/\*[\s\S]*?\*\/|\/\/.*$/gm,"").replace(/'(?:[^'\\]|\\.)'/g,"''").replace(/"(?:[^"\\]|\\.)*"/g,'""').matchAll(/\b[A-Z][A-Za-z0-9]*\b/g)].map(e=>e[0]),"Servers","Void"]);function g(e){let n=K.typeName(e);return pe.has(n)?`${n}Model`:n}function D(e){return K.memberName(e)}function l(e){return K.string(e)}function Q(e,n){let t=b(e,{style:"pascal",reserved:h});if(pe.has(t))throw new F(`The output file name "${e}" gives the Java class the name "${t}", which the SDK already uses for one of its own types. Choose another --output name, for example "${e}-sdk.ts".`);let a=n.schemas.find(o=>g(o.name)===t);if(a!==void 0)throw new F(`The output file name "${e}" gives the Java class the same name as the "${a.name}" schema, which cannot nest inside it. Choose another --output name, for example "${e}-sdk.ts".`);return t}function z(e){let n=G(e);return n===""?"api":/^[0-9]/.test(n)?`_${n}`:h.has(n)||n==="java"?`${n}_`:n}function G(e){return te.pascal(e).toLowerCase()}var Se=["getClass","hashCode","equals","clone","toString","notify","notifyAll","wait","finalize"],de=["","WithHeaders","Pages","Items"];function Z(e){let n=new Set(Se),t=new Map;for(let a of e.services.flatMap(o=>o.operations)){let o=b(a.name,{style:"camel",reserved:h}),r=o;for(let s=2;de.some(i=>n.has(r+i));s++)r=`${o}${s}`;for(let s of de)n.add(r+s);t.set(a.name,r)}return t}function je(e){return ce(e).map(t=>t.kind==="literal"?l(t.value):D(t.name)).join(" + ")}function $e(e,n){let t=n.servers??[];if(t.length===0)return;let a=new Set;e.line("/** The declared servers; the description's defaults are in each method's doc. */"),e.block("public static final class Servers {",()=>{t.forEach((o,r)=>{let s=b(o.description??`server${r+1}`,{style:"camel",reserved:h});a.has(s)&&(s=`${s}${r+1}`),a.add(s);let i=o.variables.map(u=>`String ${D(u.name)}`),c=o.variables.map(u=>`${D(u.name)} default: ${l(u.default)}`).join(", ");r>0&&e.blank(),e.doc(s,`The ${l(o.description??o.url)} base URL${c===""?".":` (${c}).`}`),e.block(`public static String ${s}(${i.join(", ")}) {`,()=>{e.line(`return ${je(o)};`)},"}")})},"}"),e.blank()}function C(e,n){let t=n.schemas.find(s=>s.name===e);if(t===void 0)return"other";let a=t.schema,o=N(a);if(o!==void 0&&(o.scalar==="string"||o.scalar==="integer"))return"enum";if((a.kind==="object"||a.kind==="intersection")&&L(a,n)!==void 0)return"record";let r=P(a,n);return r!==void 0&&r.cases.length>0&&r.cases.every(s=>C(s.schemaName,n)==="record")?"union":"other"}var he={string:"String",integer:"Long",number:"Double",boolean:"Boolean"};function ge(e){let n=e.metadata?.format;return n==="date"||n==="date-time"}function $(e,n,t="string"){let a=O(e);switch(a.kind){case"scalar":if(t==="Date"&&a.scalar==="string"){if(a.metadata?.format==="date-time")return"OffsetDateTime";if(a.metadata?.format==="date")return"LocalDate"}return he[a.scalar];case"array":return`List<${$(a.items,n,t)}>`;case"record":return`Map<String, ${$(a.value,n,t)}>`;case"ref":{if(C(a.name,n)!=="other")return g(a.name);let r=A(a,n);return r===void 0?"Object":$(r,n,t)}case"enum":return he[a.scalar];case"literal":return typeof a.value=="string"?"String":typeof a.value=="boolean"?"Boolean":"Double";case"omit":return $({kind:"ref",name:a.base},n,t);case"union":case"null":case"object":case"intersection":case"unknown":return"Object"}}function k(e,n,t,a,o=0){let r=O(e);switch(r.kind){case"scalar":return a==="Date"&&r.scalar==="string"&&ge(r)?r.metadata?.format==="date"?`asLocalDate(${n})`:`asOffsetDateTime(${n})`:`${Y[r.scalar]}(${n})`;case"enum":return`${Y[r.scalar]}(${n})`;case"literal":return`${Y[typeof r.value=="string"?"string":typeof r.value=="boolean"?"boolean":"number"]}(${n})`;case"omit":return k({kind:"ref",name:r.base},n,t,a,o);case"ref":{let s=C(r.name,t);if(s==="record")return`${g(r.name)}.fromJson(${n})`;if(s==="enum"){let c=N(A(r,t)).scalar==="string"?"asString":"asLong";return`${g(r.name)}.fromWire(${c}(${n}))`}if(s==="union")return`parse${g(r.name)}(${n})`;let i=A(r,t);return i===void 0?void 0:k(i,n,t,a,o)}case"array":case"record":{let s=o===0?"item":`item${o+1}`,i=k(r.kind==="array"?r.items:r.value,s,t,a,o+1)??s;return`${r.kind==="array"?"asList":"asMap"}(${n}, ${s} -> ${i})`}case"union":case"null":case"object":case"intersection":case"unknown":return}}var Y={string:"asString",integer:"asLong",number:"asDouble",boolean:"asBoolean"},we=["data","json","toJson","fromJson","hashCode","equals","toString","getClass","wait","notify","notifyAll","clone","finalize"];function Ae(e,n){let t=[];for(let a of n.schemas){if(C(a.name,n)!=="union")continue;P(a.schema,n).cases.some(r=>r.schemaName===e)&&t.push(g(a.name))}return t}function Ee(e,n,t,a,o,r){let s=t.map(m=>m.writeOnly?{...m,required:!1}:m),i=v(s.map(m=>m.name),{style:"camel",reserved:h,taken:we}),c=g(n),u=["JsonValue",...Ae(n,a)];e.doc(c,r),e.block(`public record ${c}(`,()=>{s.forEach((m,f)=>{let d=f<s.length-1?",":"";e.line(`${$(m.schema,a,o)} ${i[f]}${d}`)})},`) implements ${u.join(", ")} {`),e.indent(()=>{e.block(`public static ${c} fromJson(Object json) {`,()=>{e.line("Map<String, Object> data = asObject(json);"),e.block("if (data == null) {",()=>{e.line("return null;")},"}"),e.block(`return new ${c}(`,()=>{s.forEach((m,f)=>{let d=`data.get(${l(m.name)})`,y=f<s.length-1?",":"";e.line(`${k(m.schema,d,a,o)??d}${y}`)})},");")},"}"),e.blank(),e.line("@Override"),e.block("public Map<String, Object> toJson() {",()=>{e.line("Map<String, Object> data = new LinkedHashMap<>();"),s.forEach((m,f)=>{let d=`data.put(${l(m.name)}, ${i[f]});`;m.required?e.line(d):e.block(`if (${i[f]} != null) {`,()=>{e.line(d)},"}")}),e.line("return data;")},"}")}),e.line("}"),e.blank()}function qe(e,n,t,a,o){let r=g(n),s=a==="string"?"String":"Long",i=N({kind:"enum",values:t,scalar:a}).memberNames;e.doc(r,o),e.block(`public enum ${r} implements WireValue {`,()=>{t.forEach((c,u)=>{let m=typeof c=="string"?l(c):`${c}L`;e.line(`${i[u]}(${m})${u<t.length-1?",":";"}`)}),e.blank(),e.line(`private final ${s} wire;`),e.blank(),e.block(`${r}(${s} wire) {`,()=>{e.line("this.wire = wire;")},"}"),e.blank(),e.line("@Override"),e.block(`public ${s} wire() {`,()=>{e.line("return wire;")},"}"),e.blank(),e.line("/** The member for a wire value; null for null, an exception for an unknown value. */"),e.block(`public static ${r} fromWire(${s} wire) {`,()=>{e.block("if (wire == null) {",()=>{e.line("return null;")},"}"),e.block(`for (${r} member : values()) {`,()=>{e.block("if (member.wire.equals(wire)) {",()=>{e.line("return member;")},"}")},"}"),e.line(`throw new IllegalArgumentException("Unknown ${r} value: " + wire);`)},"}")},"}"),e.blank()}function X(e,n,t="string"){for(let{name:a,schema:o}of n.schemas){let r=N(o);if(r!==void 0&&(r.scalar==="string"||r.scalar==="integer")){qe(e,a,r.values,r.scalar,o.description);continue}if(o.kind==="object"||o.kind==="intersection"){let i=L(o,n);if(i!==void 0){Ee(e,a,i.properties,n,t,i.description??o.description);continue}}let s=P(o,n);if(s!==void 0){let i=g(a),c=C(a,n)==="union",u=s.cases.map(m=>`${m.value} -> ${g(m.schemaName)}`).join(", ");e.doc(i,`A discriminated union on ${l(s.property)}: ${u}.`),c&&(e.line(`public sealed interface ${i} extends JsonValue {}`),e.blank()),e.block(`public static ${c?i:"Object"} parse${i}(Object json) {`,()=>{e.line("Map<String, Object> data = asObject(json);"),e.block("if (data == null) {",()=>{e.line("return null;")},"}"),e.block(`switch (String.valueOf(data.get(${l(s.property)}))) {`,()=>{for(let m of s.cases){let f={kind:"ref",name:m.schemaName},d=k(f,"data",n,t)??"data";e.line(`case ${l(m.value)}:`),e.indent(()=>e.line(`return ${d};`))}e.line("default:"),e.indent(()=>e.line(c?`throw new IllegalArgumentException("Unknown ${s.property} value: " + data.get(${l(s.property)}));`:"return data;"))},"}")},"}"),e.blank();continue}}}function Oe(e,n="string"){let t=new j;return X(t,e,n),t.toString()}function Ne(e,n){return`List.of(${le(e,n).map(a=>`List.of(${a.map(r=>r.kind==="apiKey"?`new SecuritySpec(${l(r.scheme)}, "apiKey", ${l(r.name)}, ${l(r.in)})`:`SecuritySpec.of(${l(r.scheme)}, ${l(r.kind)})`).join(", ")})`).join(", ")})`}function Re(e){if(e===void 0)return"null";let n=t=>t===void 0?"null":l(t);return`new PaginationSpec(${[l(e.style),n(e.param),n(e.nextCursor),n(e.hasMore),n(e.nextLink),n(e.limitParam),n(e.items)].join(", ")})`}function I(e,n,t){return`new Operation(${l(e.specName??e.name)}, ${l(e.method.toUpperCase())}, ${l(e.path)}, ${Ne(e,n)}, ${Re(t)})`}function ee(e,n){let t=e.successResponseHeaders??[],a=v(t.map(r=>r.name),{style:"camel",reserved:h});return`new String[][] {${t.map((r,s)=>{let i=re(r.schema,n);return`{${l(r.name)}, ${l(a[s])}, ${l(i)}}`}).join(", ")}}`}var Ce=["body","params","op","auth","query","url","spec","payload","response","data","headers","extraHeaders","pageParams","call","base","item","page","config"];function be(e){return W(e)||e.requestBody!==void 0&&ie(e.requestBody.contentType)}function V(e,n,t){if(e.queryParams.length!==0)return v([`${n}Params`],{style:"pascal",reserved:h,taken:t.schemas.map(a=>g(a.name))})[0]}function U(e,n,t,a,o){let r=v(e.pathParams.map(f=>f.name),{style:"camel",reserved:h,taken:Ce}),s=v(e.queryParams.map(f=>f.name),{style:"camel",reserved:h}),i=e.pathParams.map((f,d)=>({java:r[d],wire:f.name})),c=e.queryParams.map((f,d)=>({java:s[d],wire:f.name,type:$(f.schema,t,o),isArray:A(O(f.schema),t)?.kind==="array"})),u=V(e,n,t),m=[...e.pathParams.map((f,d)=>`${$(f.schema,t,o)} ${r[d]}`),...a&&e.requestBody?[`${be(e)?"Object":$(e.requestBody.schema,t,o)} body`]:[],...u===void 0?[]:[`${u} params`]];return{pathArgs:i,queryFields:c,paramsClass:u,signature:m}}function ye(e,n,t,a,o){let{queryFields:r,paramsClass:s}=U(n,t,a,!1,o);s!==void 0&&(e.line(`/** The query parameters of ${t}; an unset field is not sent. */`),e.block(`public static final class ${s} {`,()=>{for(let i of r)e.line(`public ${i.type} ${i.java};`);for(let i of r)e.blank(),e.block(`public ${s} ${i.java}(${i.type} ${i.java}) {`,()=>{e.line(`this.${i.java} = ${i.java};`),e.line("return this;")},"}")},"}"),e.blank())}function B(e,n,t){n.paramsClass!==void 0&&e.block("if (params != null) {",()=>{for(let a of n.queryFields)e.block(`if (params.${a.java} != null) {`,()=>{a.isArray?e.block(`for (Object item : params.${a.java}) {`,()=>{e.line(`addQuery(${t}, ${l(a.wire)}, item);`)},"}"):e.line(`addQuery(${t}, ${l(a.wire)}, params.${a.java});`)},"}")},"}")}function H(e){return`buildUrl(config.serverUrl, op.path(), pathParams(${e.pathArgs.map(({java:t,wire:a})=>`${l(a)}, textValue(${t})`).join(", ")}))`}function ne(e,n,t,a,o,r,s=!1){let i=U(n,t,a,!0,o),c=J(n),u=E(n),m=c===void 0&&u===void 0&&n.successResponses.some(S=>S.contentType!==""),f=u!==void 0?$(u,a,o):m?"byte[]":"void",d=s?`Envelope<${f==="void"?"Void":f}>`:c!==void 0?"Iterable<ServerSentEvent>":f,y=s?`${t}WithHeaders`:t;e.doc(y,s?`Like ${t}, returning an Envelope with the declared response headers.`:n.summary??`${n.method.toUpperCase()} ${n.path}`),e.block(`public ${d} ${y}(${i.signature.join(", ")}) {`,()=>{if(e.line(`Operation op = ${I(n,a,r)};`),c!==void 0){let w=c.schema!==void 0&&c.schema.kind!=="unknown";e.line("Map<String, List<String>> base = new LinkedHashMap<>();"),B(e,i,"base"),e.line(`String url = ${H(i)};`),e.block("return iterSse(extraHeaders -> {",()=>{e.line("ResolvedAuth auth = resolveAuth(op.security(), config.auth);"),e.line("Map<String, List<String>> query = cloneQuery(auth.query());"),e.line("query.putAll(base);"),e.line("Map<String, String> headers = new LinkedHashMap<>(auth.headers());"),e.line("headers.putAll(extraHeaders);"),e.line("return send(config, new RequestSpec(op.id(), op.method(), url).headers(headers).query(query));")},`}, ${w});`);return}if(e.line("ResolvedAuth auth = resolveAuth(op.security(), config.auth);"),e.line("Map<String, List<String>> query = auth.query();"),B(e,i,"query"),e.line(`String url = ${H(i)};`),e.line("RequestSpec spec = new RequestSpec(op.id(), op.method(), url).headers(auth.headers()).query(query);"),n.requestBody!==void 0){let w=l(n.requestBody.contentType),_=W(n)?"multipartBody(body)":be(n)?`binaryBody(body, ${w})`:oe(n)?"multipartBody(body)":`jsonBody(body, ${w})`;e.line(`Body payload = ${_};`),e.line("spec.body(payload.body(), payload.contentType());")}e.line("HttpResponse<InputStream> response = send(config, spec);"),e.block("if (response.statusCode() >= 400) {",()=>{e.line("throw apiErrorFrom(response, url);")},"}");let S=m?"readBody(response)":u===void 0?void 0:k(u,"decodeJson(response)",a,o)??"decodeJson(response)";if(s){S===void 0?(e.line("readBody(response);"),e.line(`return new Envelope<>(null, readEnvelopeHeaders(response, ${ee(n,a)}), response.statusCode());`)):(e.line(`${f} data = ${S};`),e.line(`return new Envelope<>(data, readEnvelopeHeaders(response, ${ee(n,a)}), response.statusCode());`));return}if(S===void 0){e.line("readBody(response);");return}e.line(`return ${S};`)},"}"),e.blank()}function ve(e,n,t,a,o,r){let s=U(n,t,a,!1,o),i=E(n),c=i===void 0?"Object":$(i,a,o),u=ue(i,r.items,a),m=u===void 0?"Object":$(u,a,o),f=i===void 0?"page":k(i,"page",a,o)??"page",d=u===void 0?"item":k(u,"item",a,o,1)??"item",y=()=>{e.line(`Operation op = ${I(n,a,r)};`),e.line("Map<String, List<String>> base = new LinkedHashMap<>();"),B(e,s,"base"),e.block("PageCall call = pageParams -> {",()=>{e.line("ResolvedAuth auth = resolveAuth(op.security(), config.auth);"),e.line("Map<String, List<String>> query = cloneQuery(auth.query());"),e.line("query.putAll(pageParams);"),e.line(`String url = ${H(s)};`),e.line("HttpResponse<InputStream> response = send(config, new RequestSpec(op.id(), op.method(), url).headers(auth.headers()).query(query));"),e.block("if (response.statusCode() >= 400) {",()=>{e.line("throw apiErrorFrom(response, url);")},"}"),e.line("return new PageResult(decodeJson(response), response);")},"};")};e.line(`/** ${t} response pages, following the pagination rule automatically. */`),e.block(`public Iterable<${c}> ${t}Pages(${s.signature.join(", ")}) {`,()=>{y(),e.line(`return mapIterable(iterPages(call, op.pagination(), base), page -> ${f});`)},"}"),e.blank(),e.line(`/** The items of every ${t} page. */`),e.block(`public Iterable<${m}> ${t}Items(${s.signature.join(", ")}) {`,()=>{y(),e.line(`return mapIterable(flattenItems(iterPages(call, op.pagination(), base), op.pagination().items()), item -> ${d});`)},"}"),e.blank()}function Pe(){return R.split(`
|
|
9
9
|
`).filter(e=>e.startsWith("import "))}function Je(){let e=R.split(`
|
|
10
10
|
`),n=e.findIndex(a=>a.startsWith("abstract class Runtime {")),t=e.lastIndexOf("}");return e.slice(n+1,t).map(a=>a.startsWith(" ")?a.slice(4):a)}var An=({model:e,output:n,banner:t,emit:a,pagination:o,reportFinding:r})=>{let s=new j,i=a.dateType??"string",c=Q(n.stem,e),u=z(e.title);u!==G(e.title)&&r({kind:"name-changed",message:`the API title ${JSON.stringify(e.title)} cannot be a Java package as is, so the java SDK uses package "${u}" \u2014 rename the API title in the description to choose another.`,operations:[]});let m=a.runtime==="module",f=`${c}Runtime`,d=e.services.flatMap(p=>p.operations),y=Z(e),S=new Map;for(let p of d){let q=o?.get(p.name)?.spec;q!==void 0&&S.set(p.name,q)}s.line(`// Code generated by @redocly/client-generator (java) from ${l(e.title)} ${e.version}. DO NOT EDIT.`),s.line("// Regenerate with `redocly generate-client`. Java >= 17, standard library only \u2014 zero dependencies."),s.blank(),s.line(`package ${u};`),s.blank();for(let p of Pe())s.line(p);s.blank(),s.doc(c,`Client for ${e.title} (${e.version}).`),s.block(`public final class ${c}${m?` extends ${f}`:""} {`,()=>{if(X(s,e,i),$e(s,e),!m){s.line("// \u2500\u2500\u2500 Embedded runtime (@redocly/client-generator java runtime) \u2500\u2500\u2500");for(let p of Je())s.line(p);s.blank()}for(let p of d)ye(s,p,y.get(p.name),e,i);s.line("private final Config config;"),s.blank(),s.block(`public ${c}(Config config) {`,()=>{s.line("this.config = config;"),s.block("if (config.serverUrl.isEmpty()) {",()=>{s.line(`config.serverUrl = ${l(a.serverUrl??e.serverUrl??"")};`)},"}")},"}"),s.blank(),s.block(`public ${c}() {`,()=>{s.line("this(new Config());")},"}"),s.blank();for(let p of d){let q=y.get(p.name),M=S.get(p.name);ne(s,p,q,e,i,M),J(p)===void 0&&(p.successResponseHeaders?.length??0)>0&&ne(s,p,q,e,i,M,!0),M!==void 0&&ve(s,p,q,e,i,M)}},"}");let w={path:n.path.replace(/[^\\/]+$/,`${c}.java`),content:s.toString()};if(!m)return[w];let _=t.map(p=>`// ${p}`).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{a,b,c,d,e}from"./
|
|
7
|
+
import{a,b,c,d,e}from"./463LAXBF.js";import"./GX7XODFR.js";import"./KMKP6S6C.js";import"./2BPGHJRM.js";import"./WZXA5XPB.js";import"./X22IMAJK.js";import"./6RTITFQA.js";import"./RFWIIJFG.js";export{e as goDocs,c as goGenerator,d as goSample,a as goType,b as renderGoModels};
|
|
@@ -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}from"./
|
|
7
|
+
import{a as T}from"./GX7XODFR.js";import{b as N,c as j,d as Q,e as M,f as Y,g as Z,h as X,i as ee,j as ne}from"./KMKP6S6C.js";import{a as F,b as _,c as E,d as x,e as W,g as A,h as G,i as V,j as z,k as K,l as L,n as J,s as te,y as re}from"./2BPGHJRM.js";import{a as H}from"./WZXA5XPB.js";var U=E.go,P=class extends F{constructor(){super(" ")}typeName(t){return d(t)}memberName(t){return d(t)}identifier(t){return x(t,{style:"camel",reserved:U})}identifiers(t,n){let r=new Set(n??[]);return t.map(o=>{let a=d(o),s=a;for(let l=2;r.has(s);l++)s=`${a}${l}`;return r.add(s),s})}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 L(t))this.line(n===""?"//":`// ${n}`);return this}doc(t,n){let r=L(n);if(r.length===0)return this;this.line(`// ${t} \u2014 ${r[0]}`);let o=!1;for(let a of r.slice(1)){if(a===""){o||this.line("//"),o=!0;continue}this.line(`// ${a}`),o=!1}return this}layout(t){return de(me(t))}toString(){return this.layout(super.toString())}};function d(e){let t=x(e,{style:"pascal",reserved:U});return t.startsWith("_")?`N${t.slice(1)}`:t}function de(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 Ate,b as Ote}from"./FLMPHEPL.js";import{d as Rte}from"./F535IDU4.js";import{b as Ete,e as Tte}from"./ZC5BCEUX.js";import{T as xte,X as wte,c as bte,ga as wP,ka as o1,la as Cte,ma as kte,qa as k2,ta as Ste,u as yte}from"./X22IMAJK.js";import"./6RTITFQA.js";import{a as ru,b as vte,c as ar,d as Mqe,e as yl,f as Dqe}from"./RFWIIJFG.js";var Ute=ar(tn=>{"use strict";var SP=Symbol.for("react.transitional.element"),Fqe=Symbol.for("react.portal"),zqe=Symbol.for("react.fragment"),Bqe=Symbol.for("react.strict_mode"),Uqe=Symbol.for("react.profiler"),Hqe=Symbol.for("react.consumer"),Vqe=Symbol.for("react.context"),Wqe=Symbol.for("react.forward_ref"),Gqe=Symbol.for("react.suspense"),jqe=Symbol.for("react.memo"),Lte=Symbol.for("react.lazy"),Yqe=Symbol.for("react.activity"),Ite=Symbol.iterator;function qqe(i){return i===null||typeof i!="object"?null:(i=Ite&&i[Ite]||i["@@iterator"],typeof i=="function"?i:null)}var Mte={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Dte=Object.assign,Fte={};function E2(i,s,u){this.props=i,this.context=s,this.refs=Fte,this.updater=u||Mte}E2.prototype.isReactComponent={};E2.prototype.setState=function(i,s){if(typeof i!="object"&&typeof i!="function"&&i!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,i,s,"setState")};E2.prototype.forceUpdate=function(i){this.updater.enqueueForceUpdate(this,i,"forceUpdate")};function zte(){}zte.prototype=E2.prototype;function EP(i,s,u){this.props=i,this.context=s,this.refs=Fte,this.updater=u||Mte}var TP=EP.prototype=new zte;TP.constructor=EP;Dte(TP,E2.prototype);TP.isPureReactComponent=!0;var _te=Array.isArray;function kP(){}var Yi={H:null,A:null,T:null,S:null},Bte=Object.prototype.hasOwnProperty;function AP(i,s,u){var h=u.ref;return{$$typeof:SP,type:i,key:s,ref:h!==void 0?h:null,props:u}}function Zqe(i,s){return AP(i.type,s,i.props)}function RP(i){return typeof i=="object"&&i!==null&&i.$$typeof===SP}function Kqe(i){var s={"=":"=0",":":"=2"};return"$"+i.replace(/[=:]/g,function(u){return s[u]})}var Pte=/\/+/g;function CP(i,s){return typeof i=="object"&&i!==null&&i.key!=null?Kqe(""+i.key):s.toString(36)}function Xqe(i){switch(i.status){case"fulfilled":return i.value;case"rejected":throw i.reason;default:switch(typeof i.status=="string"?i.then(kP,kP):(i.status="pending",i.then(function(s){i.status==="pending"&&(i.status="fulfilled",i.value=s)},function(s){i.status==="pending"&&(i.status="rejected",i.reason=s)})),i.status){case"fulfilled":return i.value;case"rejected":throw i.reason}}throw i}function S2(i,s,u,h,m){var S=typeof i;(S==="undefined"||S==="boolean")&&(i=null);var v=!1;if(i===null)v=!0;else switch(S){case"bigint":case"string":case"number":v=!0;break;case"object":switch(i.$$typeof){case SP:case Fqe:v=!0;break;case Lte:return v=i._init,S2(v(i._payload),s,u,h,m)}}if(v)return m=m(i),v=h===""?"."+CP(i,0):h,_te(m)?(u="",v!=null&&(u=v.replace(Pte,"$&/")+"/"),S2(m,s,u,"",function(I){return I})):m!=null&&(RP(m)&&(m=Zqe(m,u+(m.key==null||i&&i.key===m.key?"":(""+m.key).replace(Pte,"$&/")+"/")+v)),s.push(m)),1;v=0;var N=h===""?".":h+":";if(_te(i))for(var O=0;O<i.length;O++)h=i[O],S=N+CP(h,O),v+=S2(h,s,u,S,m);else if(O=qqe(i),typeof O=="function")for(i=O.call(i),O=0;!(h=i.next()).done;)h=h.value,S=N+CP(h,O++),v+=S2(h,s,u,S,m);else if(S==="object"){if(typeof i.then=="function")return S2(Xqe(i),s,u,h,m);throw s=String(i),Error("Objects are not valid as a React child (found: "+(s==="[object Object]"?"object with keys {"+Object.keys(i).join(", ")+"}":s)+"). If you meant to render a collection of children, use an array instead.")}return v}function s6(i,s,u){if(i==null)return i;var h=[],m=0;return S2(i,h,"","",function(S){return s.call(u,S,m++)}),h}function Jqe(i){if(i._status===-1){var s=i._result;s=s(),s.then(function(u){(i._status===0||i._status===-1)&&(i._status=1,i._result=u)},function(u){(i._status===0||i._status===-1)&&(i._status=2,i._result=u)}),i._status===-1&&(i._status=0,i._result=s)}if(i._status===1)return i._result.default;throw i._result}var Nte=typeof reportError=="function"?reportError:function(i){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var s=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof i=="object"&&i!==null&&typeof i.message=="string"?String(i.message):String(i),error:i});if(!window.dispatchEvent(s))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",i);return}console.error(i)},Qqe={map:s6,forEach:function(i,s,u){s6(i,function(){s.apply(this,arguments)},u)},count:function(i){var s=0;return s6(i,function(){s++}),s},toArray:function(i){return s6(i,function(s){return s})||[]},only:function(i){if(!RP(i))throw Error("React.Children.only expected to receive a single React element child.");return i}};tn.Activity=Yqe;tn.Children=Qqe;tn.Component=E2;tn.Fragment=zqe;tn.Profiler=Uqe;tn.PureComponent=EP;tn.StrictMode=Bqe;tn.Suspense=Gqe;tn.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=Yi;tn.__COMPILER_RUNTIME={__proto__:null,c:function(i){return Yi.H.useMemoCache(i)}};tn.cache=function(i){return function(){return i.apply(null,arguments)}};tn.cacheSignal=function(){return null};tn.cloneElement=function(i,s,u){if(i==null)throw Error("The argument must be a React element, but you passed "+i+".");var h=Dte({},i.props),m=i.key;if(s!=null)for(S in s.key!==void 0&&(m=""+s.key),s)!Bte.call(s,S)||S==="key"||S==="__self"||S==="__source"||S==="ref"&&s.ref===void 0||(h[S]=s[S]);var S=arguments.length-2;if(S===1)h.children=u;else if(1<S){for(var v=Array(S),N=0;N<S;N++)v[N]=arguments[N+2];h.children=v}return AP(i.type,m,h)};tn.createContext=function(i){return i={$$typeof:Vqe,_currentValue:i,_currentValue2:i,_threadCount:0,Provider:null,Consumer:null},i.Provider=i,i.Consumer={$$typeof:Hqe,_context:i},i};tn.createElement=function(i,s,u){var h,m={},S=null;if(s!=null)for(h in s.key!==void 0&&(S=""+s.key),s)Bte.call(s,h)&&h!=="key"&&h!=="__self"&&h!=="__source"&&(m[h]=s[h]);var v=arguments.length-2;if(v===1)m.children=u;else if(1<v){for(var N=Array(v),O=0;O<v;O++)N[O]=arguments[O+2];m.children=N}if(i&&i.defaultProps)for(h in v=i.defaultProps,v)m[h]===void 0&&(m[h]=v[h]);return AP(i,S,m)};tn.createRef=function(){return{current:null}};tn.forwardRef=function(i){return{$$typeof:Wqe,render:i}};tn.isValidElement=RP;tn.lazy=function(i){return{$$typeof:Lte,_payload:{_status:-1,_result:i},_init:Jqe}};tn.memo=function(i,s){return{$$typeof:jqe,type:i,compare:s===void 0?null:s}};tn.startTransition=function(i){var s=Yi.T,u={};Yi.T=u;try{var h=i(),m=Yi.S;m!==null&&m(u,h),typeof h=="object"&&h!==null&&typeof h.then=="function"&&h.then(kP,Nte)}catch(S){Nte(S)}finally{s!==null&&u.types!==null&&(s.types=u.types),Yi.T=s}};tn.unstable_useCacheRefresh=function(){return Yi.H.useCacheRefresh()};tn.use=function(i){return Yi.H.use(i)};tn.useActionState=function(i,s,u){return Yi.H.useActionState(i,s,u)};tn.useCallback=function(i,s){return Yi.H.useCallback(i,s)};tn.useContext=function(i){return Yi.H.useContext(i)};tn.useDebugValue=function(){};tn.useDeferredValue=function(i,s){return Yi.H.useDeferredValue(i,s)};tn.useEffect=function(i,s){return Yi.H.useEffect(i,s)};tn.useEffectEvent=function(i){return Yi.H.useEffectEvent(i)};tn.useId=function(){return Yi.H.useId()};tn.useImperativeHandle=function(i,s,u){return Yi.H.useImperativeHandle(i,s,u)};tn.useInsertionEffect=function(i,s){return Yi.H.useInsertionEffect(i,s)};tn.useLayoutEffect=function(i,s){return Yi.H.useLayoutEffect(i,s)};tn.useMemo=function(i,s){return Yi.H.useMemo(i,s)};tn.useOptimistic=function(i,s){return Yi.H.useOptimistic(i,s)};tn.useReducer=function(i,s,u){return Yi.H.useReducer(i,s,u)};tn.useRef=function(i){return Yi.H.useRef(i)};tn.useState=function(i){return Yi.H.useState(i)};tn.useSyncExternalStore=function(i,s,u){return Yi.H.useSyncExternalStore(i,s,u)};tn.useTransition=function(){return Yi.H.useTransition()};tn.version="19.2.7"});var Hte=ar((Jr,l6)=>{"use strict";process.env.NODE_ENV!=="production"&&(function(){function i(ee,Ee){Object.defineProperty(h.prototype,ee,{get:function(){console.warn("%s(...) is deprecated in plain JavaScript React classes. %s",Ee[0],Ee[1])}})}function s(ee){return ee===null||typeof ee!="object"?null:(ee=Nr&&ee[Nr]||ee["@@iterator"],typeof ee=="function"?ee:null)}function u(ee,Ee){ee=(ee=ee.constructor)&&(ee.displayName||ee.name)||"ReactClass";var tt=ee+"."+Ee;yn[tt]||(console.error("Can't call %s on a component that is not yet mounted. This is a no-op, but it might indicate a bug in your application. Instead, assign to `this.state` directly or define a `state = {};` class property with the desired state in the %s component.",Ee,ee),yn[tt]=!0)}function h(ee,Ee,tt){this.props=ee,this.context=Ee,this.refs=Pn,this.updater=tt||ur}function m(){}function S(ee,Ee,tt){this.props=ee,this.context=Ee,this.refs=Pn,this.updater=tt||ur}function v(){}function N(ee){return""+ee}function O(ee){try{N(ee);var Ee=!1}catch{Ee=!0}if(Ee){Ee=console;var tt=Ee.error,ht=typeof Symbol=="function"&&Symbol.toStringTag&&ee[Symbol.toStringTag]||ee.constructor.name||"Object";return tt.call(Ee,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",ht),N(ee)}}function I(ee){if(ee==null)return null;if(typeof ee=="function")return ee.$$typeof===$n?null:ee.displayName||ee.name||null;if(typeof ee=="string")return ee;switch(ee){case _n:return"Fragment";case Me:return"Profiler";case cr:return"StrictMode";case Gt:return"Suspense";case Mt:return"SuspenseList";case hr:return"Activity"}if(typeof ee=="object")switch(typeof ee.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),ee.$$typeof){case kr:return"Portal";case wt:return ee.displayName||"Context";case nt:return(ee._context.displayName||"Context")+".Consumer";case or:var Ee=ee.render;return ee=ee.displayName,ee||(ee=Ee.displayName||Ee.name||"",ee=ee!==""?"ForwardRef("+ee+")":"ForwardRef"),ee;case yt:return Ee=ee.displayName||null,Ee!==null?Ee:I(ee.type)||"Memo";case er:Ee=ee._payload,ee=ee._init;try{return I(ee(Ee))}catch{}}return null}function H(ee){if(ee===_n)return"<>";if(typeof ee=="object"&&ee!==null&&ee.$$typeof===er)return"<...>";try{var Ee=I(ee);return Ee?"<"+Ee+">":"<...>"}catch{return"<...>"}}function M(){var ee=br.A;return ee===null?null:ee.getOwner()}function Y(){return Error("react-stack-top-frame")}function J(ee){if(lo.call(ee,"key")){var Ee=Object.getOwnPropertyDescriptor(ee,"key").get;if(Ee&&Ee.isReactWarning)return!1}return ee.key!==void 0}function we(ee,Ee){function tt(){Un||(Un=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",Ee))}tt.isReactWarning=!0,Object.defineProperty(ee,"key",{get:tt,configurable:!0})}function ke(){var ee=I(this.type);return Eo[ee]||(Eo[ee]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),ee=this.props.ref,ee!==void 0?ee:null}function pe(ee,Ee,tt,ht,_t,qt){var Kt=tt.ref;return ee={$$typeof:lr,type:ee,key:Ee,props:tt,_owner:ht},(Kt!==void 0?Kt:null)!==null?Object.defineProperty(ee,"ref",{enumerable:!1,get:ke}):Object.defineProperty(ee,"ref",{enumerable:!1,value:null}),ee._store={},Object.defineProperty(ee._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(ee,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(ee,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:_t}),Object.defineProperty(ee,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:qt}),Object.freeze&&(Object.freeze(ee.props),Object.freeze(ee)),ee}function Fe(ee,Ee){return Ee=pe(ee.type,Ee,ee.props,ee._owner,ee._debugStack,ee._debugTask),ee._store&&(Ee._store.validated=ee._store.validated),Ee}function ze(ee){ft(ee)?ee._store&&(ee._store.validated=1):typeof ee=="object"&&ee!==null&&ee.$$typeof===er&&(ee._payload.status==="fulfilled"?ft(ee._payload.value)&&ee._payload.value._store&&(ee._payload.value._store.validated=1):ee._store&&(ee._store.validated=1))}function ft(ee){return typeof ee=="object"&&ee!==null&&ee.$$typeof===lr}function St(ee){var Ee={"=":"=0",":":"=2"};return"$"+ee.replace(/[=:]/g,function(tt){return Ee[tt]})}function mt(ee,Ee){return typeof ee=="object"&&ee!==null&&ee.key!=null?(O(ee.key),St(""+ee.key)):Ee.toString(36)}function Ve(ee){switch(ee.status){case"fulfilled":return ee.value;case"rejected":throw ee.reason;default:switch(typeof ee.status=="string"?ee.then(v,v):(ee.status="pending",ee.then(function(Ee){ee.status==="pending"&&(ee.status="fulfilled",ee.value=Ee)},function(Ee){ee.status==="pending"&&(ee.status="rejected",ee.reason=Ee)})),ee.status){case"fulfilled":return ee.value;case"rejected":throw ee.reason}}throw ee}function Lt(ee,Ee,tt,ht,_t){var qt=typeof ee;(qt==="undefined"||qt==="boolean")&&(ee=null);var Kt=!1;if(ee===null)Kt=!0;else switch(qt){case"bigint":case"string":case"number":Kt=!0;break;case"object":switch(ee.$$typeof){case lr:case kr:Kt=!0;break;case er:return Kt=ee._init,Lt(Kt(ee._payload),Ee,tt,ht,_t)}}if(Kt){Kt=ee,_t=_t(Kt);var Pr=ht===""?"."+mt(Kt,0):ht;return xn(_t)?(tt="",Pr!=null&&(tt=Pr.replace(Bo,"$&/")+"/"),Lt(_t,Ee,tt,"",function(Dr){return Dr})):_t!=null&&(ft(_t)&&(_t.key!=null&&(Kt&&Kt.key===_t.key||O(_t.key)),tt=Fe(_t,tt+(_t.key==null||Kt&&Kt.key===_t.key?"":(""+_t.key).replace(Bo,"$&/")+"/")+Pr),ht!==""&&Kt!=null&&ft(Kt)&&Kt.key==null&&Kt._store&&!Kt._store.validated&&(tt._store.validated=2),_t=tt),Ee.push(_t)),1}if(Kt=0,Pr=ht===""?".":ht+":",xn(ee))for(var yr=0;yr<ee.length;yr++)ht=ee[yr],qt=Pr+mt(ht,yr),Kt+=Lt(ht,Ee,tt,qt,_t);else if(yr=s(ee),typeof yr=="function")for(yr===ee.entries&&(kn||console.warn("Using Maps as children is not supported. Use an array of keyed ReactElements instead."),kn=!0),ee=yr.call(ee),yr=0;!(ht=ee.next()).done;)ht=ht.value,qt=Pr+mt(ht,yr++),Kt+=Lt(ht,Ee,tt,qt,_t);else if(qt==="object"){if(typeof ee.then=="function")return Lt(Ve(ee),Ee,tt,ht,_t);throw Ee=String(ee),Error("Objects are not valid as a React child (found: "+(Ee==="[object Object]"?"object with keys {"+Object.keys(ee).join(", ")+"}":Ee)+"). If you meant to render a collection of children, use an array instead.")}return Kt}function It(ee,Ee,tt){if(ee==null)return ee;var ht=[],_t=0;return Lt(ee,ht,"","",function(qt){return Ee.call(tt,qt,_t++)}),ht}function Pt(ee){if(ee._status===-1){var Ee=ee._ioInfo;Ee!=null&&(Ee.start=Ee.end=performance.now()),Ee=ee._result;var tt=Ee();if(tt.then(function(_t){if(ee._status===0||ee._status===-1){ee._status=1,ee._result=_t;var qt=ee._ioInfo;qt!=null&&(qt.end=performance.now()),tt.status===void 0&&(tt.status="fulfilled",tt.value=_t)}},function(_t){if(ee._status===0||ee._status===-1){ee._status=2,ee._result=_t;var qt=ee._ioInfo;qt!=null&&(qt.end=performance.now()),tt.status===void 0&&(tt.status="rejected",tt.reason=_t)}}),Ee=ee._ioInfo,Ee!=null){Ee.value=tt;var ht=tt.displayName;typeof ht=="string"&&(Ee.name=ht)}ee._status===-1&&(ee._status=0,ee._result=tt)}if(ee._status===1)return Ee=ee._result,Ee===void 0&&console.error(`lazy: Expected the result of a dynamic import() call. Instead received: %s
|
|
7
|
+
import{a as Ate,b as Ote}from"./5DOFLOGV.js";import{d as Rte}from"./CEC4F5TY.js";import{b as Ete,e as Tte}from"./ZC5BCEUX.js";import{T as xte,X as wte,c as bte,ga as wP,ka as o1,la as Cte,ma as kte,qa as k2,ta as Ste,u as yte}from"./X22IMAJK.js";import"./6RTITFQA.js";import{a as ru,b as vte,c as ar,d as Mqe,e as yl,f as Dqe}from"./RFWIIJFG.js";var Ute=ar(tn=>{"use strict";var SP=Symbol.for("react.transitional.element"),Fqe=Symbol.for("react.portal"),zqe=Symbol.for("react.fragment"),Bqe=Symbol.for("react.strict_mode"),Uqe=Symbol.for("react.profiler"),Hqe=Symbol.for("react.consumer"),Vqe=Symbol.for("react.context"),Wqe=Symbol.for("react.forward_ref"),Gqe=Symbol.for("react.suspense"),jqe=Symbol.for("react.memo"),Lte=Symbol.for("react.lazy"),Yqe=Symbol.for("react.activity"),Ite=Symbol.iterator;function qqe(i){return i===null||typeof i!="object"?null:(i=Ite&&i[Ite]||i["@@iterator"],typeof i=="function"?i:null)}var Mte={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Dte=Object.assign,Fte={};function E2(i,s,u){this.props=i,this.context=s,this.refs=Fte,this.updater=u||Mte}E2.prototype.isReactComponent={};E2.prototype.setState=function(i,s){if(typeof i!="object"&&typeof i!="function"&&i!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,i,s,"setState")};E2.prototype.forceUpdate=function(i){this.updater.enqueueForceUpdate(this,i,"forceUpdate")};function zte(){}zte.prototype=E2.prototype;function EP(i,s,u){this.props=i,this.context=s,this.refs=Fte,this.updater=u||Mte}var TP=EP.prototype=new zte;TP.constructor=EP;Dte(TP,E2.prototype);TP.isPureReactComponent=!0;var _te=Array.isArray;function kP(){}var Yi={H:null,A:null,T:null,S:null},Bte=Object.prototype.hasOwnProperty;function AP(i,s,u){var h=u.ref;return{$$typeof:SP,type:i,key:s,ref:h!==void 0?h:null,props:u}}function Zqe(i,s){return AP(i.type,s,i.props)}function RP(i){return typeof i=="object"&&i!==null&&i.$$typeof===SP}function Kqe(i){var s={"=":"=0",":":"=2"};return"$"+i.replace(/[=:]/g,function(u){return s[u]})}var Pte=/\/+/g;function CP(i,s){return typeof i=="object"&&i!==null&&i.key!=null?Kqe(""+i.key):s.toString(36)}function Xqe(i){switch(i.status){case"fulfilled":return i.value;case"rejected":throw i.reason;default:switch(typeof i.status=="string"?i.then(kP,kP):(i.status="pending",i.then(function(s){i.status==="pending"&&(i.status="fulfilled",i.value=s)},function(s){i.status==="pending"&&(i.status="rejected",i.reason=s)})),i.status){case"fulfilled":return i.value;case"rejected":throw i.reason}}throw i}function S2(i,s,u,h,m){var S=typeof i;(S==="undefined"||S==="boolean")&&(i=null);var v=!1;if(i===null)v=!0;else switch(S){case"bigint":case"string":case"number":v=!0;break;case"object":switch(i.$$typeof){case SP:case Fqe:v=!0;break;case Lte:return v=i._init,S2(v(i._payload),s,u,h,m)}}if(v)return m=m(i),v=h===""?"."+CP(i,0):h,_te(m)?(u="",v!=null&&(u=v.replace(Pte,"$&/")+"/"),S2(m,s,u,"",function(I){return I})):m!=null&&(RP(m)&&(m=Zqe(m,u+(m.key==null||i&&i.key===m.key?"":(""+m.key).replace(Pte,"$&/")+"/")+v)),s.push(m)),1;v=0;var N=h===""?".":h+":";if(_te(i))for(var O=0;O<i.length;O++)h=i[O],S=N+CP(h,O),v+=S2(h,s,u,S,m);else if(O=qqe(i),typeof O=="function")for(i=O.call(i),O=0;!(h=i.next()).done;)h=h.value,S=N+CP(h,O++),v+=S2(h,s,u,S,m);else if(S==="object"){if(typeof i.then=="function")return S2(Xqe(i),s,u,h,m);throw s=String(i),Error("Objects are not valid as a React child (found: "+(s==="[object Object]"?"object with keys {"+Object.keys(i).join(", ")+"}":s)+"). If you meant to render a collection of children, use an array instead.")}return v}function s6(i,s,u){if(i==null)return i;var h=[],m=0;return S2(i,h,"","",function(S){return s.call(u,S,m++)}),h}function Jqe(i){if(i._status===-1){var s=i._result;s=s(),s.then(function(u){(i._status===0||i._status===-1)&&(i._status=1,i._result=u)},function(u){(i._status===0||i._status===-1)&&(i._status=2,i._result=u)}),i._status===-1&&(i._status=0,i._result=s)}if(i._status===1)return i._result.default;throw i._result}var Nte=typeof reportError=="function"?reportError:function(i){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var s=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof i=="object"&&i!==null&&typeof i.message=="string"?String(i.message):String(i),error:i});if(!window.dispatchEvent(s))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",i);return}console.error(i)},Qqe={map:s6,forEach:function(i,s,u){s6(i,function(){s.apply(this,arguments)},u)},count:function(i){var s=0;return s6(i,function(){s++}),s},toArray:function(i){return s6(i,function(s){return s})||[]},only:function(i){if(!RP(i))throw Error("React.Children.only expected to receive a single React element child.");return i}};tn.Activity=Yqe;tn.Children=Qqe;tn.Component=E2;tn.Fragment=zqe;tn.Profiler=Uqe;tn.PureComponent=EP;tn.StrictMode=Bqe;tn.Suspense=Gqe;tn.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=Yi;tn.__COMPILER_RUNTIME={__proto__:null,c:function(i){return Yi.H.useMemoCache(i)}};tn.cache=function(i){return function(){return i.apply(null,arguments)}};tn.cacheSignal=function(){return null};tn.cloneElement=function(i,s,u){if(i==null)throw Error("The argument must be a React element, but you passed "+i+".");var h=Dte({},i.props),m=i.key;if(s!=null)for(S in s.key!==void 0&&(m=""+s.key),s)!Bte.call(s,S)||S==="key"||S==="__self"||S==="__source"||S==="ref"&&s.ref===void 0||(h[S]=s[S]);var S=arguments.length-2;if(S===1)h.children=u;else if(1<S){for(var v=Array(S),N=0;N<S;N++)v[N]=arguments[N+2];h.children=v}return AP(i.type,m,h)};tn.createContext=function(i){return i={$$typeof:Vqe,_currentValue:i,_currentValue2:i,_threadCount:0,Provider:null,Consumer:null},i.Provider=i,i.Consumer={$$typeof:Hqe,_context:i},i};tn.createElement=function(i,s,u){var h,m={},S=null;if(s!=null)for(h in s.key!==void 0&&(S=""+s.key),s)Bte.call(s,h)&&h!=="key"&&h!=="__self"&&h!=="__source"&&(m[h]=s[h]);var v=arguments.length-2;if(v===1)m.children=u;else if(1<v){for(var N=Array(v),O=0;O<v;O++)N[O]=arguments[O+2];m.children=N}if(i&&i.defaultProps)for(h in v=i.defaultProps,v)m[h]===void 0&&(m[h]=v[h]);return AP(i,S,m)};tn.createRef=function(){return{current:null}};tn.forwardRef=function(i){return{$$typeof:Wqe,render:i}};tn.isValidElement=RP;tn.lazy=function(i){return{$$typeof:Lte,_payload:{_status:-1,_result:i},_init:Jqe}};tn.memo=function(i,s){return{$$typeof:jqe,type:i,compare:s===void 0?null:s}};tn.startTransition=function(i){var s=Yi.T,u={};Yi.T=u;try{var h=i(),m=Yi.S;m!==null&&m(u,h),typeof h=="object"&&h!==null&&typeof h.then=="function"&&h.then(kP,Nte)}catch(S){Nte(S)}finally{s!==null&&u.types!==null&&(s.types=u.types),Yi.T=s}};tn.unstable_useCacheRefresh=function(){return Yi.H.useCacheRefresh()};tn.use=function(i){return Yi.H.use(i)};tn.useActionState=function(i,s,u){return Yi.H.useActionState(i,s,u)};tn.useCallback=function(i,s){return Yi.H.useCallback(i,s)};tn.useContext=function(i){return Yi.H.useContext(i)};tn.useDebugValue=function(){};tn.useDeferredValue=function(i,s){return Yi.H.useDeferredValue(i,s)};tn.useEffect=function(i,s){return Yi.H.useEffect(i,s)};tn.useEffectEvent=function(i){return Yi.H.useEffectEvent(i)};tn.useId=function(){return Yi.H.useId()};tn.useImperativeHandle=function(i,s,u){return Yi.H.useImperativeHandle(i,s,u)};tn.useInsertionEffect=function(i,s){return Yi.H.useInsertionEffect(i,s)};tn.useLayoutEffect=function(i,s){return Yi.H.useLayoutEffect(i,s)};tn.useMemo=function(i,s){return Yi.H.useMemo(i,s)};tn.useOptimistic=function(i,s){return Yi.H.useOptimistic(i,s)};tn.useReducer=function(i,s,u){return Yi.H.useReducer(i,s,u)};tn.useRef=function(i){return Yi.H.useRef(i)};tn.useState=function(i){return Yi.H.useState(i)};tn.useSyncExternalStore=function(i,s,u){return Yi.H.useSyncExternalStore(i,s,u)};tn.useTransition=function(){return Yi.H.useTransition()};tn.version="19.2.7"});var Hte=ar((Jr,l6)=>{"use strict";process.env.NODE_ENV!=="production"&&(function(){function i(ee,Ee){Object.defineProperty(h.prototype,ee,{get:function(){console.warn("%s(...) is deprecated in plain JavaScript React classes. %s",Ee[0],Ee[1])}})}function s(ee){return ee===null||typeof ee!="object"?null:(ee=Nr&&ee[Nr]||ee["@@iterator"],typeof ee=="function"?ee:null)}function u(ee,Ee){ee=(ee=ee.constructor)&&(ee.displayName||ee.name)||"ReactClass";var tt=ee+"."+Ee;yn[tt]||(console.error("Can't call %s on a component that is not yet mounted. This is a no-op, but it might indicate a bug in your application. Instead, assign to `this.state` directly or define a `state = {};` class property with the desired state in the %s component.",Ee,ee),yn[tt]=!0)}function h(ee,Ee,tt){this.props=ee,this.context=Ee,this.refs=Pn,this.updater=tt||ur}function m(){}function S(ee,Ee,tt){this.props=ee,this.context=Ee,this.refs=Pn,this.updater=tt||ur}function v(){}function N(ee){return""+ee}function O(ee){try{N(ee);var Ee=!1}catch{Ee=!0}if(Ee){Ee=console;var tt=Ee.error,ht=typeof Symbol=="function"&&Symbol.toStringTag&&ee[Symbol.toStringTag]||ee.constructor.name||"Object";return tt.call(Ee,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",ht),N(ee)}}function I(ee){if(ee==null)return null;if(typeof ee=="function")return ee.$$typeof===$n?null:ee.displayName||ee.name||null;if(typeof ee=="string")return ee;switch(ee){case _n:return"Fragment";case Me:return"Profiler";case cr:return"StrictMode";case Gt:return"Suspense";case Mt:return"SuspenseList";case hr:return"Activity"}if(typeof ee=="object")switch(typeof ee.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),ee.$$typeof){case kr:return"Portal";case wt:return ee.displayName||"Context";case nt:return(ee._context.displayName||"Context")+".Consumer";case or:var Ee=ee.render;return ee=ee.displayName,ee||(ee=Ee.displayName||Ee.name||"",ee=ee!==""?"ForwardRef("+ee+")":"ForwardRef"),ee;case yt:return Ee=ee.displayName||null,Ee!==null?Ee:I(ee.type)||"Memo";case er:Ee=ee._payload,ee=ee._init;try{return I(ee(Ee))}catch{}}return null}function H(ee){if(ee===_n)return"<>";if(typeof ee=="object"&&ee!==null&&ee.$$typeof===er)return"<...>";try{var Ee=I(ee);return Ee?"<"+Ee+">":"<...>"}catch{return"<...>"}}function M(){var ee=br.A;return ee===null?null:ee.getOwner()}function Y(){return Error("react-stack-top-frame")}function J(ee){if(lo.call(ee,"key")){var Ee=Object.getOwnPropertyDescriptor(ee,"key").get;if(Ee&&Ee.isReactWarning)return!1}return ee.key!==void 0}function we(ee,Ee){function tt(){Un||(Un=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",Ee))}tt.isReactWarning=!0,Object.defineProperty(ee,"key",{get:tt,configurable:!0})}function ke(){var ee=I(this.type);return Eo[ee]||(Eo[ee]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),ee=this.props.ref,ee!==void 0?ee:null}function pe(ee,Ee,tt,ht,_t,qt){var Kt=tt.ref;return ee={$$typeof:lr,type:ee,key:Ee,props:tt,_owner:ht},(Kt!==void 0?Kt:null)!==null?Object.defineProperty(ee,"ref",{enumerable:!1,get:ke}):Object.defineProperty(ee,"ref",{enumerable:!1,value:null}),ee._store={},Object.defineProperty(ee._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(ee,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(ee,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:_t}),Object.defineProperty(ee,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:qt}),Object.freeze&&(Object.freeze(ee.props),Object.freeze(ee)),ee}function Fe(ee,Ee){return Ee=pe(ee.type,Ee,ee.props,ee._owner,ee._debugStack,ee._debugTask),ee._store&&(Ee._store.validated=ee._store.validated),Ee}function ze(ee){ft(ee)?ee._store&&(ee._store.validated=1):typeof ee=="object"&&ee!==null&&ee.$$typeof===er&&(ee._payload.status==="fulfilled"?ft(ee._payload.value)&&ee._payload.value._store&&(ee._payload.value._store.validated=1):ee._store&&(ee._store.validated=1))}function ft(ee){return typeof ee=="object"&&ee!==null&&ee.$$typeof===lr}function St(ee){var Ee={"=":"=0",":":"=2"};return"$"+ee.replace(/[=:]/g,function(tt){return Ee[tt]})}function mt(ee,Ee){return typeof ee=="object"&&ee!==null&&ee.key!=null?(O(ee.key),St(""+ee.key)):Ee.toString(36)}function Ve(ee){switch(ee.status){case"fulfilled":return ee.value;case"rejected":throw ee.reason;default:switch(typeof ee.status=="string"?ee.then(v,v):(ee.status="pending",ee.then(function(Ee){ee.status==="pending"&&(ee.status="fulfilled",ee.value=Ee)},function(Ee){ee.status==="pending"&&(ee.status="rejected",ee.reason=Ee)})),ee.status){case"fulfilled":return ee.value;case"rejected":throw ee.reason}}throw ee}function Lt(ee,Ee,tt,ht,_t){var qt=typeof ee;(qt==="undefined"||qt==="boolean")&&(ee=null);var Kt=!1;if(ee===null)Kt=!0;else switch(qt){case"bigint":case"string":case"number":Kt=!0;break;case"object":switch(ee.$$typeof){case lr:case kr:Kt=!0;break;case er:return Kt=ee._init,Lt(Kt(ee._payload),Ee,tt,ht,_t)}}if(Kt){Kt=ee,_t=_t(Kt);var Pr=ht===""?"."+mt(Kt,0):ht;return xn(_t)?(tt="",Pr!=null&&(tt=Pr.replace(Bo,"$&/")+"/"),Lt(_t,Ee,tt,"",function(Dr){return Dr})):_t!=null&&(ft(_t)&&(_t.key!=null&&(Kt&&Kt.key===_t.key||O(_t.key)),tt=Fe(_t,tt+(_t.key==null||Kt&&Kt.key===_t.key?"":(""+_t.key).replace(Bo,"$&/")+"/")+Pr),ht!==""&&Kt!=null&&ft(Kt)&&Kt.key==null&&Kt._store&&!Kt._store.validated&&(tt._store.validated=2),_t=tt),Ee.push(_t)),1}if(Kt=0,Pr=ht===""?".":ht+":",xn(ee))for(var yr=0;yr<ee.length;yr++)ht=ee[yr],qt=Pr+mt(ht,yr),Kt+=Lt(ht,Ee,tt,qt,_t);else if(yr=s(ee),typeof yr=="function")for(yr===ee.entries&&(kn||console.warn("Using Maps as children is not supported. Use an array of keyed ReactElements instead."),kn=!0),ee=yr.call(ee),yr=0;!(ht=ee.next()).done;)ht=ht.value,qt=Pr+mt(ht,yr++),Kt+=Lt(ht,Ee,tt,qt,_t);else if(qt==="object"){if(typeof ee.then=="function")return Lt(Ve(ee),Ee,tt,ht,_t);throw Ee=String(ee),Error("Objects are not valid as a React child (found: "+(Ee==="[object Object]"?"object with keys {"+Object.keys(ee).join(", ")+"}":Ee)+"). If you meant to render a collection of children, use an array instead.")}return Kt}function It(ee,Ee,tt){if(ee==null)return ee;var ht=[],_t=0;return Lt(ee,ht,"","",function(qt){return Ee.call(tt,qt,_t++)}),ht}function Pt(ee){if(ee._status===-1){var Ee=ee._ioInfo;Ee!=null&&(Ee.start=Ee.end=performance.now()),Ee=ee._result;var tt=Ee();if(tt.then(function(_t){if(ee._status===0||ee._status===-1){ee._status=1,ee._result=_t;var qt=ee._ioInfo;qt!=null&&(qt.end=performance.now()),tt.status===void 0&&(tt.status="fulfilled",tt.value=_t)}},function(_t){if(ee._status===0||ee._status===-1){ee._status=2,ee._result=_t;var qt=ee._ioInfo;qt!=null&&(qt.end=performance.now()),tt.status===void 0&&(tt.status="rejected",tt.reason=_t)}}),Ee=ee._ioInfo,Ee!=null){Ee.value=tt;var ht=tt.displayName;typeof ht=="string"&&(Ee.name=ht)}ee._status===-1&&(ee._status=0,ee._result=tt)}if(ee._status===1)return Ee=ee._result,Ee===void 0&&console.error(`lazy: Expected the result of a dynamic import() call. Instead received: %s
|
|
8
8
|
|
|
9
9
|
Your code should look like:
|
|
10
10
|
const MyComponent = lazy(() => import('./MyComponent'))
|
|
@@ -4,5 +4,5 @@ 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,e as P,g as L,h as v,i as R,k as V}from"./
|
|
8
|
-
`)}import{execSync as ne}from"node:child_process";import*as p from"node:fs";import{existsSync as re,writeFileSync as oe,readFileSync as M}from"node:fs";import*as $ from"node:os";import{tmpdir as U}from"node:os";import{dirname as J,join as A}from"node:path";async function F(e=L){try{let{fetchWithTimeout:t}=await import("./QXBSAWH3.js");return await t(P,{timeout:e}),!0}catch{return!1}}var y="***";function be(e){return process.env.REDOCLY_TELEMETRY!=="off"&&e?.resolvedConfig.telemetry!=="off"}async function Oe({config:e,argv:t,exit_code:n,execution_time:r,spec_version:o,spec_keyword:i,spec_full_version:s,respect_x_security_auth_types:c,respect_source_description_types:f,respect_criterion_object_types:N,lint_rules_with_errors:T,lint_rules_with_warnings:b,lint_rules_with_ignored_problems:O,generate_client:a,eject_generator:l,bundle:G}){try{if(!t||!await F(1e3))return;let{_:[h],$0:pe,...D}=t,{RedoclyOAuthClient:K,getReuniteUrl:H}=await import("./WTJ3S4D7.js"),q=new K(C),Q=H(e,D.residency),Z=await q.isAuthorized(Q),g=de();g||(g=`ann_${V()}`,ue(g));let E=k(o),X=[{id:h,object:"command",uri:`urn:redocly:cli:command:${h}`,logged_in:Z?"yes":"no",command:h,...ae(D,process.argv.slice(2)),node_version:process.version,npm_version:le(),version:C,exit_code:n,execution_time:r,metadata:process.env.REDOCLY_CLI_TELEMETRY_METADATA,environment_ci:process.env.CI,environment:process.env.REDOCLY_ENVIRONMENT,has_config:typeof e?.document?.parsed>"u"?"no":"yes",spec_version:o,spec_keyword:i,spec_full_version:s,respect_x_security_auth_types:E==="arazzo1"&&c?.length?JSON.stringify(c):void 0,respect_source_description_types:E==="arazzo1"&&f?.length?JSON.stringify(f):void 0,respect_criterion_object_types:E==="arazzo1"&&N?.length?JSON.stringify(N):void 0,lint_rules_with_errors:T?.length?JSON.stringify(T):void 0,lint_rules_with_warnings:b?.length?JSON.stringify(b):void 0,lint_rules_with_ignored_problems:O?.length?JSON.stringify(O):void 0,generate_client_builtin_generators:a?.generate_client_builtin_generators?.length?JSON.stringify(a.generate_client_builtin_generators):void 0,generate_client_custom_generators_count:a?.generate_client_custom_generators_count,generate_client_toolkit_imports:a?.generate_client_toolkit_imports?.length?JSON.stringify(a.generate_client_toolkit_imports):void 0,generate_client_error_category:a?.generate_client_error_category,generate_client_ejected_generators:a?.generate_client_ejected_generators?.length?JSON.stringify(a.generate_client_ejected_generators):void 0,generate_client_composed_apis_count:a?.generate_client_composed_apis_count,eject_generator_action:l?.eject_generator_action,eject_generator_name:l?.eject_generator_name,eject_generator_outcome:l?.eject_generator_outcome,eject_generator_conflicts:l?.eject_generator_conflicts,eject_generator_from_version:l?.eject_generator_from_version,eject_generator_to_version:l?.eject_generator_to_version,bundle_overlays_count:G?.bundle_overlays_count}],ee=R.mapToCloudEvent({type:"com.redocly.command.ran",source:"urn:redocly:cli",origin:"redocly-cli",env:"development",osPlatform:$.platform(),actor:{id:g,object:"user",uri:""},category:"product",data:X}),{otelTelemetry:te}=await import("./
|
|
7
|
+
import{a as C,e as P,g as L,h as v,i as R,k as V}from"./CEC4F5TY.js";import{u as S}from"./ZC5BCEUX.js";import{c as m,da as u,la as k,u as I}from"./X22IMAJK.js";var _=" ",z=" ";function _e(e){let t=Math.max(...e.map(o=>S(o).length)),n=t+z.length*2,r=_+u("\u2551"+" ".repeat(n)+"\u2551");return["",_+u("\u2554"+"\u2550".repeat(n)+"\u2557"),r,...e.map(o=>{let i=" ".repeat(t-S(o).length);return`${_}${u("\u2551")}${z}${o}${i}${z}${u("\u2551")}`}),r,_+u("\u255A"+"\u2550".repeat(n)+"\u255D"),"",""].join(`
|
|
8
|
+
`)}import{execSync as ne}from"node:child_process";import*as p from"node:fs";import{existsSync as re,writeFileSync as oe,readFileSync as M}from"node:fs";import*as $ from"node:os";import{tmpdir as U}from"node:os";import{dirname as J,join as A}from"node:path";async function F(e=L){try{let{fetchWithTimeout:t}=await import("./QXBSAWH3.js");return await t(P,{timeout:e}),!0}catch{return!1}}var y="***";function be(e){return process.env.REDOCLY_TELEMETRY!=="off"&&e?.resolvedConfig.telemetry!=="off"}async function Oe({config:e,argv:t,exit_code:n,execution_time:r,spec_version:o,spec_keyword:i,spec_full_version:s,respect_x_security_auth_types:c,respect_source_description_types:f,respect_criterion_object_types:N,lint_rules_with_errors:T,lint_rules_with_warnings:b,lint_rules_with_ignored_problems:O,generate_client:a,eject_generator:l,bundle:G}){try{if(!t||!await F(1e3))return;let{_:[h],$0:pe,...D}=t,{RedoclyOAuthClient:K,getReuniteUrl:H}=await import("./WTJ3S4D7.js"),q=new K(C),Q=H(e,D.residency),Z=await q.isAuthorized(Q),g=de();g||(g=`ann_${V()}`,ue(g));let E=k(o),X=[{id:h,object:"command",uri:`urn:redocly:cli:command:${h}`,logged_in:Z?"yes":"no",command:h,...ae(D,process.argv.slice(2)),node_version:process.version,npm_version:le(),version:C,exit_code:n,execution_time:r,metadata:process.env.REDOCLY_CLI_TELEMETRY_METADATA,environment_ci:process.env.CI,environment:process.env.REDOCLY_ENVIRONMENT,has_config:typeof e?.document?.parsed>"u"?"no":"yes",spec_version:o,spec_keyword:i,spec_full_version:s,respect_x_security_auth_types:E==="arazzo1"&&c?.length?JSON.stringify(c):void 0,respect_source_description_types:E==="arazzo1"&&f?.length?JSON.stringify(f):void 0,respect_criterion_object_types:E==="arazzo1"&&N?.length?JSON.stringify(N):void 0,lint_rules_with_errors:T?.length?JSON.stringify(T):void 0,lint_rules_with_warnings:b?.length?JSON.stringify(b):void 0,lint_rules_with_ignored_problems:O?.length?JSON.stringify(O):void 0,generate_client_builtin_generators:a?.generate_client_builtin_generators?.length?JSON.stringify(a.generate_client_builtin_generators):void 0,generate_client_custom_generators_count:a?.generate_client_custom_generators_count,generate_client_toolkit_imports:a?.generate_client_toolkit_imports?.length?JSON.stringify(a.generate_client_toolkit_imports):void 0,generate_client_error_category:a?.generate_client_error_category,generate_client_ejected_generators:a?.generate_client_ejected_generators?.length?JSON.stringify(a.generate_client_ejected_generators):void 0,generate_client_composed_apis_count:a?.generate_client_composed_apis_count,eject_generator_action:l?.eject_generator_action,eject_generator_name:l?.eject_generator_name,eject_generator_outcome:l?.eject_generator_outcome,eject_generator_conflicts:l?.eject_generator_conflicts,eject_generator_from_version:l?.eject_generator_from_version,eject_generator_to_version:l?.eject_generator_to_version,bundle_overlays_count:G?.bundle_overlays_count}],ee=R.mapToCloudEvent({type:"com.redocly.command.ran",source:"urn:redocly:cli",origin:"redocly-cli",env:"development",osPlatform:$.platform(),actor:{id:g,object:"user",uri:""},category:"product",data:X}),{otelTelemetry:te}=await import("./H6THGX5A.js");te.send(ee)}catch{}}function De(e,t){for(let n of e.sourceDescriptions??[])n.type&&t.add(n.type)}function Ie(e,t){for(let n of e.workflows??[]){d(n.successActions,t),d(n.failureActions,t);for(let r of n.steps??[])W(r.successCriteria,t),d(r.onSuccess,t),d(r.onFailure,t)}d(Object.values(e.components?.successActions??{}),t),d(Object.values(e.components?.failureActions??{}),t)}function d(e,t){for(let n of e??[])W(n.criteria,t)}function W(e,t){for(let n of e??[]){let r=ie(n);r&&t.add(r)}}function ie(e){let t=e.type;return typeof t=="string"?t:t?.type||(e.condition?"simple":void 0)}function ke(e,t){for(let n of e.workflows??[]){for(let r of n["x-security"]??[]){let o=r.scheme;if(o?.type){let i=o.type==="http"?o.scheme:o.type;i&&t.add(i)}}for(let r of n.steps??[])for(let o of r["x-security"]??[]){let i=o.scheme;if(i?.type){let c=i.type==="http"?i.scheme:i.type;c&&t.add(c)}let s=o.schemeName;s&&t.add(s)}}}function se(e){return p.existsSync(e)&&p.statSync(e).isFile()}function ce(e){return p.existsSync(e)&&p.statSync(e).isDirectory()}function w(e){return e&&(I(e)?e.split("://")[0]+"://url":se(e)?e.replace(/.+\.([^.]+)$/,(t,n)=>"file-"+n):ce(e)?"folder":e)}function j(e,t,n){let r=Array.isArray(t)?t:[t];for(let o of r)o.length>1&&(e=e.replaceAll(o,n));return e}function Y(e,t){let n={};for(let[r,o]of Object.entries(e))t.includes(r)?n[r]=y:m(o)?n[r]=Y(o,t):n[r]=o;return n}function x(e,t,n=[]){if(Array.isArray(e))return e.forEach(r=>x(r,t,n)),n;if(m(e))for(let[r,o]of Object.entries(e))t.includes(r)&&typeof o=="string"?n.push(o):(m(o)||Array.isArray(o))&&x(o,t,n);return n}function ae(e,t){let n=["organization","o","input","i","author","a","clientCert","clientKey","caCert","server","S"],r=t.join(" "),o={};for(let[i,s]of Object.entries(e))if(n.includes(i))o[i]=y,r=j(r,s,y);else if(typeof s=="string"){let c=w(s);o[i]=c,r=j(r,s,c)}else if(Array.isArray(s)){o[i]=s.map(w);for(let c of s){let f=w(c);r.includes(c)&&(r=r.replaceAll(c,f))}}else if(m(s)){let c=x(s,n);for(let f of c)r=j(r,f,y);o[i]=Y(s,n)}else o[i]=s;return{arguments:JSON.stringify(o),raw_input:r}}var fe=process.platform==="win32"?A(J(process.execPath),"node_modules","npm","package.json"):A(J(process.execPath),"..","lib","node_modules","npm","package.json");function le(){try{return JSON.parse(M(fe,"utf8")).version}catch{}try{return ne("npm -v",{stdio:["ignore","pipe","ignore"]}).toString().trim()}catch{return"unknown"}}var ue=e=>{if(!(process.env.CI||!e))try{let n=A(U(),v);oe(n,e)}catch{}},de=()=>{if(!process.env.CI)try{let t=A(U(),v);return re(t)?M(t).toString().trim():void 0}catch{return}};export{_e as a,be as b,Oe as c,De as d,Ie as e,ke as f};
|
|
@@ -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,b,c,d,e}from"./
|
|
7
|
+
import{a,b,c,d,e}from"./LDSAXT7B.js";import"./GX7XODFR.js";import"./KMKP6S6C.js";import"./2BPGHJRM.js";import"./WZXA5XPB.js";import"./X22IMAJK.js";import"./6RTITFQA.js";import"./RFWIIJFG.js";export{e as phpDocs,c as phpGenerator,d as phpSample,a as phpType,b as renderPhpModels};
|